summaryrefslogtreecommitdiffstats
path: root/src/nm.c
diff options
context:
space:
mode:
authorUlrich Drepper <[email protected]>2009-06-13 15:55:42 -0700
committerUlrich Drepper <[email protected]>2009-06-13 15:55:42 -0700
commitf189493154d0041deced00e6a99cc5426dc9d260 (patch)
tree6c55e4b0b571c49d01e1b355e52f72b6d5c069eb /src/nm.c
parentb47d290a36509e26e145f6d3eb2e6590ec6c554d (diff)
Add aliases for elf_getshnum and elf_getshstrndx.
Sun in their implementation messed up the semantics of these functions. To get back to source code compatibility they asked for a solution. We simply add aliases for the two affected functions, named elf_getshdrnum and elf_getshdrstrndx. The semantics remains the same. Users of the old interfaces receive a warning for now. In future we might make it impossible to link programs which request the old interfaces (binary compatibility will of course be maintained).
Diffstat (limited to 'src/nm.c')
-rw-r--r--src/nm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nm.c b/src/nm.c
index 8833948a..01519a5a 100644
--- a/src/nm.c
+++ b/src/nm.c
@@ -724,7 +724,7 @@ show_symbols_sysv (Ebl *ebl, GElf_Word strndx,
int longest_where)
{
size_t shnum;
- if (elf_getshnum (ebl->elf, &shnum) < 0)
+ if (elf_getshdrnum (ebl->elf, &shnum) < 0)
INTERNAL_ERROR (fullname);
bool scnnames_malloced = shnum * sizeof (const char *) > 128 * 1024;
@@ -735,7 +735,7 @@ show_symbols_sysv (Ebl *ebl, GElf_Word strndx,
scnnames = (const char **) alloca (sizeof (const char *) * shnum);
/* Get the section header string table index. */
size_t shstrndx;
- if (elf_getshstrndx (ebl->elf, &shstrndx) < 0)
+ if (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0)
error (EXIT_FAILURE, 0,
gettext ("cannot get section header string table index"));
@@ -997,7 +997,7 @@ show_symbols (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, Elf_Scn *xndxscn,
{
/* Get the section header string table index. */
size_t shstrndx;
- if (elf_getshstrndx (ebl->elf, &shstrndx) < 0)
+ if (elf_getshdrstrndx (ebl->elf, &shstrndx) < 0)
error (EXIT_FAILURE, 0,
gettext ("cannot get section header string table index"));