diff options
Diffstat (limited to 'libelf')
| -rw-r--r-- | libelf/ChangeLog | 21 | ||||
| -rw-r--r-- | libelf/Makefile.am | 2 | ||||
| -rw-r--r-- | libelf/elf.h | 6 | ||||
| -rw-r--r-- | libelf/elf32_checksum.c | 4 | ||||
| -rw-r--r-- | libelf/elf32_getshdr.c | 4 | ||||
| -rw-r--r-- | libelf/elf_getshdrnum.c (renamed from libelf/elf_getshnum.c) | 10 | ||||
| -rw-r--r-- | libelf/elf_getshdrstrndx.c (renamed from libelf/elf_getshstrndx.c) | 8 | ||||
| -rw-r--r-- | libelf/libelf.h | 16 | ||||
| -rw-r--r-- | libelf/libelf.map | 5 | ||||
| -rw-r--r-- | libelf/libelfP.h | 9 |
10 files changed, 64 insertions, 21 deletions
diff --git a/libelf/ChangeLog b/libelf/ChangeLog index bfc3ee5f..a0163db1 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,24 @@ +2009-06-13 Ulrich Drepper <[email protected]> + + * Makefile.am (libelf_a_SOURCES): Replace elf_getshnum.c and + elf_getshstrndx.c with elf_getshdrnum.c and elf_getshdrstrndx.c. + * elf_getshnum.c: Renamed to... + * elf_getshdrnum.c: ...this. Rename function and add old name as + alias. Likewise for internal functions with derived names. + * elf_getshstrndx.c: Renamed to... + * elf_getshdrstrndx.c: ...this. Rename function and add old name as + alias. Likewise for internal functions with derived names. + * libelf.h: Add prototypes for new names. Make old names as + deprecated. + * libelfP.h: Rename internal function prototypes. + * libelf.map: Export for names. + * elf32_checksum.c: Don't use deprecated functions. + * elf32_getshdr.c: Likewise. + +2009-06-01 Ulrich Drepper <[email protected]> + + * elf.h: Update from glibc. + 2009-04-14 Roland McGrath <[email protected]> * elf.h: Update from glibc. diff --git a/libelf/Makefile.am b/libelf/Makefile.am index 84b01a86..fbb19a63 100644 --- a/libelf/Makefile.am +++ b/libelf/Makefile.am @@ -91,7 +91,7 @@ libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \ gelf_update_versym.c gelf_update_verneed.c \ gelf_update_vernaux.c gelf_update_verdef.c \ gelf_update_verdaux.c \ - elf_getshnum.c elf_getshstrndx.c \ + elf_getshdrnum.c elf_getshdrstrndx.c \ gelf_checksum.c elf32_checksum.c elf64_checksum.c \ libelf_crc32.c libelf_next_prime.c \ elf_clone.c \ diff --git a/libelf/elf.h b/libelf/elf.h index 062ef00f..8fdf74b0 100644 --- a/libelf/elf.h +++ b/libelf/elf.h @@ -1177,8 +1177,9 @@ typedef struct pointer to code and to argument, returning the TLS offset for the symbol. */ +#define R_386_IRELATIVE 42 /* Adjust indirectly by program base */ /* Keep this the last entry. */ -#define R_386_NUM 42 +#define R_386_NUM 43 /* SUN SPARC specific definitions. */ @@ -2625,8 +2626,9 @@ typedef Elf32_Addr Elf32_Conflict; #define R_X86_64_TLSDESC_CALL 35 /* Marker for call through TLS descriptor. */ #define R_X86_64_TLSDESC 36 /* TLS descriptor. */ +#define R_X86_64_IRELATIVE 37 /* Adjust indirectly by program base */ -#define R_X86_64_NUM 37 +#define R_X86_64_NUM 38 /* AM33 relocations. */ diff --git a/libelf/elf32_checksum.c b/libelf/elf32_checksum.c index 32b4a02d..ad040b80 100644 --- a/libelf/elf32_checksum.c +++ b/libelf/elf32_checksum.c @@ -1,5 +1,5 @@ /* Compute simple checksum from permanent parts of the ELF file. - Copyright (C) 2002, 2003, 2004, 2005 Red Hat, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2009 Red Hat, Inc. This file is part of Red Hat elfutils. Written by Ulrich Drepper <[email protected]>, 2002. @@ -90,7 +90,7 @@ elfw2(LIBELFBITS,checksum) (elf) return -1l; /* Find the section header string table. */ - if (INTUSE(elf_getshstrndx) (elf, &shstrndx) < 0) + if (INTUSE(elf_getshdrstrndx) (elf, &shstrndx) < 0) { /* This can only happen if the ELF handle is not for real. */ __libelf_seterrno (ELF_E_INVALID_HANDLE); diff --git a/libelf/elf32_getshdr.c b/libelf/elf32_getshdr.c index 91f5b3a1..8d650d9f 100644 --- a/libelf/elf32_getshdr.c +++ b/libelf/elf32_getshdr.c @@ -1,5 +1,5 @@ /* Return section header. - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2007 Red Hat, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2007, 2009 Red Hat, Inc. This file is part of Red Hat elfutils. Written by Ulrich Drepper <[email protected]>, 1998. @@ -81,7 +81,7 @@ load_shdr_wrlock (Elf_Scn *scn) goto out; size_t shnum; - if (__elf_getshnum_rdlock (elf, &shnum) != 0) + if (__elf_getshdrnum_rdlock (elf, &shnum) != 0) goto out; size_t size = shnum * sizeof (ElfW2(LIBELFBITS,Shdr)); diff --git a/libelf/elf_getshnum.c b/libelf/elf_getshdrnum.c index 3c65ef4c..ed1149bb 100644 --- a/libelf/elf_getshnum.c +++ b/libelf/elf_getshdrnum.c @@ -1,5 +1,5 @@ /* Return number of sections in the ELF file. - Copyright (C) 2002 Red Hat, Inc. + Copyright (C) 2002, 2009 Red Hat, Inc. This file is part of Red Hat elfutils. Written by Ulrich Drepper <[email protected]>, 2002. @@ -60,7 +60,7 @@ int -__elf_getshnum_rdlock (elf, dst) +__elf_getshdrnum_rdlock (elf, dst) Elf *elf; size_t *dst; { @@ -92,7 +92,7 @@ __elf_getshnum_rdlock (elf, dst) } int -elf_getshnum (elf, dst) +elf_getshdrnum (elf, dst) Elf *elf; size_t *dst; { @@ -102,8 +102,10 @@ elf_getshnum (elf, dst) return -1; rwlock_rdlock (elf->lock); - result = __elf_getshnum_rdlock (elf, dst); + result = __elf_getshdrnum_rdlock (elf, dst); rwlock_unlock (elf->lock); return result; } +/* Alias for the deprecated name. */ +strong_alias (elf_getshdrnum, elf_getshnum) diff --git a/libelf/elf_getshstrndx.c b/libelf/elf_getshdrstrndx.c index 52516a8e..5e89b343 100644 --- a/libelf/elf_getshstrndx.c +++ b/libelf/elf_getshdrstrndx.c @@ -1,5 +1,5 @@ /* Return section index of section header string table. - Copyright (C) 2002, 2005 Red Hat, Inc. + Copyright (C) 2002, 2005, 2009 Red Hat, Inc. This file is part of Red Hat elfutils. Written by Ulrich Drepper <[email protected]>, 2002. @@ -64,7 +64,7 @@ int -elf_getshstrndx (elf, dst) +elf_getshdrstrndx (elf, dst) Elf *elf; size_t *dst; { @@ -200,4 +200,6 @@ elf_getshstrndx (elf, dst) return result; } -INTDEF(elf_getshstrndx) +INTDEF(elf_getshdrstrndx) +/* Alias for the deprecated name. */ +strong_alias (elf_getshdrstrndx, elf_getshstrndx) diff --git a/libelf/libelf.h b/libelf/libelf.h index dea0d838..16c7a7a2 100644 --- a/libelf/libelf.h +++ b/libelf/libelf.h @@ -1,5 +1,5 @@ /* Interface for libelf. - Copyright (C) 1998, 1999, 2000, 2002, 2004, 2005, 2006, 2007 Red Hat, Inc. + Copyright (C) 1998-2000, 2002, 2004-2007, 2009 Red Hat, Inc. This file is part of Red Hat elfutils. Red Hat elfutils is free software; you can redistribute it and/or modify @@ -256,14 +256,24 @@ extern int elf_scnshndx (Elf_Scn *__scn); sections than can be represented in the e_shnum field of the ELF header the information from the sh_size field in the zeroth section header is used. */ -extern int elf_getshnum (Elf *__elf, size_t *__dst); +extern int elf_getshdrnum (Elf *__elf, size_t *__dst); +/* Sun messed up the implementation of 'elf_getshnum' in their implementation. + It was agreed to make the same functionality available under a different + name and obsolete the old name. */ +extern int elf_getshnum (Elf *__elf, size_t *__dst) + __attribute__ ((__deprecated__)); /* Get the section index of the section header string table in the ELF file. If the index cannot be represented in the e_shnum field of the ELF header the information from the sh_link field in the zeroth section header is used. */ -extern int elf_getshstrndx (Elf *__elf, size_t *__dst); +extern int elf_getshdrstrndx (Elf *__elf, size_t *__dst); +/* Sun messed up the implementation of 'elf_getshnum' in their implementation. + It was agreed to make the same functionality available under a different + name and obsolete the old name. */ +extern int elf_getshstrndx (Elf *__elf, size_t *__dst) + __attribute__ ((__deprecated__)); /* Retrieve section header of ELFCLASS32 binary. */ diff --git a/libelf/libelf.map b/libelf/libelf.map index c2537774..e0f40eb8 100644 --- a/libelf/libelf.map +++ b/libelf/libelf.map @@ -128,3 +128,8 @@ ELFUTILS_1.4 { global: elf_scnshndx; } ELFUTILS_1.3; + +ELFUTILS_1.5 { + global: + elf_getshdrnum; elf_getshdrstrndx; +} ELFUTILS_1.4; diff --git a/libelf/libelfP.h b/libelf/libelfP.h index 818f42ac..47d7c2c5 100644 --- a/libelf/libelfP.h +++ b/libelf/libelfP.h @@ -533,11 +533,12 @@ extern Elf32_Phdr *__elf32_newphdr_internal (Elf *__elf, size_t __cnt) extern Elf64_Phdr *__elf64_newphdr_internal (Elf *__elf, size_t __cnt) attribute_hidden; extern Elf_Scn *__elf32_offscn_internal (Elf *__elf, Elf32_Off __offset) - attribute_hidden; + attribute_hidden; extern Elf_Scn *__elf64_offscn_internal (Elf *__elf, Elf64_Off __offset) - attribute_hidden; -extern int __elf_getshnum_rdlock (Elf *__elf, size_t *__dst) internal_function; -extern int __elf_getshstrndx_internal (Elf *__elf, size_t *__dst) + attribute_hidden; +extern int __elf_getshdrnum_rdlock (Elf *__elf, size_t *__dst) + internal_function; +extern int __elf_getshdrstrndx_internal (Elf *__elf, size_t *__dst) attribute_hidden; extern Elf32_Shdr *__elf32_getshdr_rdlock (Elf_Scn *__scn) internal_function; extern Elf64_Shdr *__elf64_getshdr_rdlock (Elf_Scn *__scn) internal_function; |
