summaryrefslogtreecommitdiff
path: root/backends/ppc64_symbol.c
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2014-11-22 23:08:48 +0100
committerMark Wielaard <mjw@redhat.com>2014-11-26 20:17:22 +0100
commit712c8faddc08844fb1f2814c8b6e817f03b0698e (patch)
treedf68a29bd32a009875438dfbbd68cbe6f30425c0 /backends/ppc64_symbol.c
parent2deeb7c51020df07d752107cdc6822d70ae1da4e (diff)
downloadelfutils-712c8faddc08844fb1f2814c8b6e817f03b0698e.tar.gz
Use elf_getphdrnum instead of accessing ehdr->e_phnum directly.
Using elf_getphdrnum lets us handle ELF files that use more than PN_XNUM phdrs. And guards against some corrupt files. Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'backends/ppc64_symbol.c')
-rw-r--r--backends/ppc64_symbol.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/backends/ppc64_symbol.c b/backends/ppc64_symbol.c
index 5a020d8d..0feddcee 100644
--- a/backends/ppc64_symbol.c
+++ b/backends/ppc64_symbol.c
@@ -108,8 +108,7 @@ ppc64_check_special_symbol (Elf *elf, GElf_Ehdr *ehdr,
/* Check if backend uses a bss PLT in this file. */
bool
-ppc64_bss_plt_p (Elf *elf __attribute__ ((unused)),
- GElf_Ehdr *ehdr __attribute__ ((unused)))
+ppc64_bss_plt_p (Elf *elf __attribute__ ((unused)))
{
return true;
}