diff options
Diffstat (limited to 'backends/ppc_symbol.c')
-rw-r--r-- | backends/ppc_symbol.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/backends/ppc_symbol.c b/backends/ppc_symbol.c index 733114b6..37d49182 100644 --- a/backends/ppc_symbol.c +++ b/backends/ppc_symbol.c @@ -1,5 +1,5 @@ /* PPC specific symbolic name handling. - Copyright (C) 2004, 2005, 2007, 2014 Red Hat, Inc. + Copyright (C) 2004, 2005, 2007, 2014, 2015 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper <drepper@redhat.com>, 2004. @@ -143,9 +143,14 @@ ppc_check_special_symbol (Elf *elf, GElf_Ehdr *ehdr, const GElf_Sym *sym, if (sname == NULL) return false; + /* Small data area. Normally points to .sdata, in which case we + check it is at an offset of 0x8000. It might however fall in the + .data section, in which case we cannot check the offset. The + size always should be zero. */ if (strcmp (name, "_SDA_BASE_") == 0) - return (strcmp (sname, ".sdata") == 0 - && sym->st_value == destshdr->sh_addr + 0x8000 + return (((strcmp (sname, ".sdata") == 0 + && sym->st_value == destshdr->sh_addr + 0x8000) + || strcmp (sname, ".data") == 0) && sym->st_size == 0); if (strcmp (name, "_SDA2_BASE_") == 0) |