aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-08-17 09:07:35 +0000
committerJakub Jelinek <jakub@redhat.com>2004-08-17 09:07:35 +0000
commit90e3cdf2a90318ccd4b5612d1e9fbd56ada53d84 (patch)
tree9d031cf419b1c87199a3e574a76499b1b27f0e07 /bfd/elf.c
parent7c2c850509cdc711332dcffedef489386aee0a76 (diff)
downloadgdb-90e3cdf2a90318ccd4b5612d1e9fbd56ada53d84.zip
gdb-90e3cdf2a90318ccd4b5612d1e9fbd56ada53d84.tar.gz
gdb-90e3cdf2a90318ccd4b5612d1e9fbd56ada53d84.tar.bz2
bfd/
* elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define if not yet defined. * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define. (synthetic_opd, synthetic_relocatable): New variables. (compare_symbols, compare_relocs): New helper routines. (ppc64_elf_get_synthetic_symtab): New function. * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument to relsyms. * bfd-in2.h: Regenerated. * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument to relsyms. Return 0 if abfd is relocatable. binutils/ * objdump.c (dump_bfd): For relocatable objects, pass syms instead of dynsyms to bfd_get_synthetic_symtab.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 387f719..d1fa2c0 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -7744,7 +7744,7 @@ bfd_elf_bfd_from_remote_memory
}
long
-_bfd_elf_get_synthetic_symtab (bfd *abfd, asymbol **dynsyms, asymbol **ret)
+_bfd_elf_get_synthetic_symtab (bfd *abfd, asymbol **relsyms, asymbol **ret)
{
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
asection *relplt;
@@ -7758,6 +7758,9 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd, asymbol **dynsyms, asymbol **ret)
char *names;
asection *plt;
+ if ((abfd->flags & (DYNAMIC | EXEC_P)) == 0)
+ return 0;
+
*ret = NULL;
if (!bed->plt_sym_val)
return 0;
@@ -7779,7 +7782,7 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd, asymbol **dynsyms, asymbol **ret)
return 0;
slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table;
- if (! (*slurp_relocs) (abfd, relplt, dynsyms, TRUE))
+ if (! (*slurp_relocs) (abfd, relplt, relsyms, TRUE))
return -1;
count = relplt->size / hdr->sh_entsize;