Module Name: src
Committed By: yamt
Date: Thu May 22 15:48:04 UTC 2014
Modified Files:
src/external/bsd/libelf/dist [yamt-pagecache]: elf_update.c libelf.h
libelf_data.c libelf_phdr.c
Log Message:
sync with head.
for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.6.1 src/external/bsd/libelf/dist/elf_update.c \
src/external/bsd/libelf/dist/libelf_data.c \
src/external/bsd/libelf/dist/libelf_phdr.c
cvs rdiff -u -r1.7 -r1.7.6.1 src/external/bsd/libelf/dist/libelf.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/libelf/dist/elf_update.c
diff -u src/external/bsd/libelf/dist/elf_update.c:1.4 src/external/bsd/libelf/dist/elf_update.c:1.4.6.1
--- src/external/bsd/libelf/dist/elf_update.c:1.4 Mon Feb 22 10:48:32 2010
+++ src/external/bsd/libelf/dist/elf_update.c Thu May 22 15:48:04 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: elf_update.c,v 1.4 2010/02/22 10:48:32 darran Exp $ */
+/* $NetBSD: elf_update.c,v 1.4.6.1 2014/05/22 15:48:04 yamt Exp $ */
/*-
* Copyright (c) 2006-2008 Joseph Koshy
@@ -357,7 +357,7 @@ _libelf_resync_sections(Elf *e, off_t rc
static off_t
_libelf_resync_elf(Elf *e)
{
- int ec, eh_class, eh_type;
+ int ec, eh_class;
unsigned int eh_byteorder, eh_version;
size_t align, fsz;
size_t phnum, shnum;
@@ -386,14 +386,12 @@ _libelf_resync_elf(Elf *e)
eh_class = eh32->e_ident[EI_CLASS];
phoff = (uint64_t) eh32->e_phoff;
shoff = (uint64_t) eh32->e_shoff;
- eh_type = eh32->e_type;
eh_version = eh32->e_version;
} else {
eh_byteorder = eh64->e_ident[EI_DATA];
eh_class = eh64->e_ident[EI_CLASS];
phoff = eh64->e_phoff;
shoff = eh64->e_shoff;
- eh_type = eh64->e_type;
eh_version = eh64->e_version;
}
Index: src/external/bsd/libelf/dist/libelf_data.c
diff -u src/external/bsd/libelf/dist/libelf_data.c:1.4 src/external/bsd/libelf/dist/libelf_data.c:1.4.6.1
--- src/external/bsd/libelf/dist/libelf_data.c:1.4 Mon Feb 22 10:48:33 2010
+++ src/external/bsd/libelf/dist/libelf_data.c Thu May 22 15:48:04 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: libelf_data.c,v 1.4 2010/02/22 10:48:33 darran Exp $ */
+/* $NetBSD: libelf_data.c,v 1.4.6.1 2014/05/22 15:48:04 yamt Exp $ */
/*-
* Copyright (c) 2006 Joseph Koshy
@@ -87,9 +87,13 @@ _libelf_xlate_shtype(uint32_t sht)
case SHT_SUNW_syminfo:
return (ELF_T_SYMINFO);
#endif /* __LIBELF_HAVE_ELF_SYMINFO */
- case SHT_AMD64_UNWIND: /* == SHT_IA_64_UNWIND */
- return (ELF_T_BYTE);
+#if defined(__LIBELF_HAVE_ELF_ATTRIBUTES)
+ case SHT_GNU_ATTRIBUTES:
+ return (ELF_T_BYTE); /* XXX */
+#endif /* __LIBELF_HAVE_ELF_ATTRIBUTES */
default:
+ if (sht >= SHT_LOPROC && sht <= SHT_HIPROC)
+ return (ELF_T_BYTE);
return (-1);
}
}
Index: src/external/bsd/libelf/dist/libelf_phdr.c
diff -u src/external/bsd/libelf/dist/libelf_phdr.c:1.4 src/external/bsd/libelf/dist/libelf_phdr.c:1.4.6.1
--- src/external/bsd/libelf/dist/libelf_phdr.c:1.4 Mon Feb 22 10:48:33 2010
+++ src/external/bsd/libelf/dist/libelf_phdr.c Thu May 22 15:48:04 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: libelf_phdr.c,v 1.4 2010/02/22 10:48:33 darran Exp $ */
+/* $NetBSD: libelf_phdr.c,v 1.4.6.1 2014/05/22 15:48:04 yamt Exp $ */
/*-
* Copyright (c) 2006 Joseph Koshy
@@ -45,7 +45,7 @@
void *
_libelf_getphdr(Elf *e, int ec)
{
- size_t phnum, phentsize;
+ size_t phnum;
size_t fsz, msz;
uint64_t phoff;
Elf32_Ehdr *eh32;
@@ -76,11 +76,9 @@ _libelf_getphdr(Elf *e, int ec)
if (ec == ELFCLASS32) {
eh32 = (Elf32_Ehdr *) ehdr;
- phentsize = eh32->e_phentsize;
phoff = (uint64_t) eh32->e_phoff;
} else {
eh64 = (Elf64_Ehdr *) ehdr;
- phentsize = eh64->e_phentsize;
phoff = (uint64_t) eh64->e_phoff;
}
Index: src/external/bsd/libelf/dist/libelf.h
diff -u src/external/bsd/libelf/dist/libelf.h:1.7 src/external/bsd/libelf/dist/libelf.h:1.7.6.1
--- src/external/bsd/libelf/dist/libelf.h:1.7 Mon Feb 22 10:48:32 2010
+++ src/external/bsd/libelf/dist/libelf.h Thu May 22 15:48:04 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: libelf.h,v 1.7 2010/02/22 10:48:32 darran Exp $ */
+/* $NetBSD: libelf.h,v 1.7.6.1 2014/05/22 15:48:04 yamt Exp $ */
/*-
* Copyright (c) 2006 Joseph Koshy
@@ -54,6 +54,7 @@
# define __LIBELF_HAVE_ELF_NOTE 1
# define __LIBELF_HAVE_ELF_SYMINFO 1
# define __LIBELF_HAVE_ELF_VERS 1
+# define __LIBELF_HAVE_ELF_ATTRIBUTES 1
#elif defined(__FreeBSD__)
# include <sys/elf32.h>
# include <sys/elf64.h>