diff options
author | Daniel Jacobowitz <drow@false.org> | 2005-05-20 22:02:08 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2005-05-20 22:02:08 +0000 |
commit | 643796e38cff6ea4e4ed62cc5e00a267c4db23a2 (patch) | |
tree | 09c82d0606155f4dbd865275a25581c00bcefa49 | |
parent | 4dc4a9a515d83cbef3d06d21b934df37e85d663c (diff) | |
download | gdb-643796e38cff6ea4e4ed62cc5e00a267c4db23a2.zip gdb-643796e38cff6ea4e4ed62cc5e00a267c4db23a2.tar.gz gdb-643796e38cff6ea4e4ed62cc5e00a267c4db23a2.tar.bz2 |
* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
copy relocations for VxWorks.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-i386.c | 12 |
2 files changed, 12 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a32d1fc..d05d185 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com> + * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate + copy relocations for VxWorks. + +2005-05-20 Daniel Jacobowitz <dan@codesourcery.com> + * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field has_sda_refs. (ppc_elf_copy_indirect_symbol): Copy has_sda_refs. diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index bfc3417..3e5f339 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -1431,7 +1431,13 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info, return TRUE; } - if (ELIMINATE_COPY_RELOCS) + htab = elf_i386_hash_table (info); + + /* If there aren't any dynamic relocs in read-only sections, then + we can keep the dynamic relocs and avoid the copy reloc. This + doesn't work on VxWorks, where we can not have dynamic relocations + (other than copy and jump slot relocations) in an executable. */ + if (ELIMINATE_COPY_RELOCS && !htab->is_vxworks) { struct elf_i386_link_hash_entry * eh; struct elf_i386_dyn_relocs *p; @@ -1444,8 +1450,6 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info, break; } - /* If we didn't find any dynamic relocs in read-only sections, then - we'll be keeping the dynamic relocs and avoiding the copy reloc. */ if (p == NULL) { h->non_got_ref = 0; @@ -1463,8 +1467,6 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info, both the dynamic object and the regular object will refer to the same memory location for the variable. */ - htab = elf_i386_hash_table (info); - /* We must generate a R_386_COPY reloc to tell the dynamic linker to copy the initial value out of the dynamic object and into the runtime process image. */ |