From f189493154d0041deced00e6a99cc5426dc9d260 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 13 Jun 2009 15:55:42 -0700 Subject: 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). --- src/size.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/size.c') diff --git a/src/size.c b/src/size.c index 4698c350..d3dc1fe5 100644 --- a/src/size.c +++ b/src/size.c @@ -420,7 +420,7 @@ show_sysv (Elf *elf, const char *prefix, const char *fname, /* Get the section header string table index. */ size_t shstrndx; - if (unlikely (elf_getshstrndx (elf, &shstrndx) < 0)) + if (unlikely (elf_getshdrstrndx (elf, &shstrndx) < 0)) error (EXIT_FAILURE, 0, gettext ("cannot get section header string table index")); @@ -494,7 +494,7 @@ show_sysv_one_line (Elf *elf) { /* Get the section header string table index. */ size_t shstrndx; - if (unlikely (elf_getshstrndx (elf, &shstrndx) < 0)) + if (unlikely (elf_getshdrstrndx (elf, &shstrndx) < 0)) error (EXIT_FAILURE, 0, gettext ("cannot get section header string table index")); -- cgit v1.2.3