diff options
author | Daniel Jacobowitz <drow@false.org> | 2008-04-29 11:53:45 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2008-04-29 11:53:45 +0000 |
commit | 266b05cf7629d7cefecd2b31542a2332e3d5e385 (patch) | |
tree | 329c85db1221b44ff910b956ca91823f3688fb5f /bfd | |
parent | a0fe373c768a198d0eb78aecedcbe809708dc921 (diff) | |
download | gdb-266b05cf7629d7cefecd2b31542a2332e3d5e385.zip gdb-266b05cf7629d7cefecd2b31542a2332e3d5e385.tar.gz gdb-266b05cf7629d7cefecd2b31542a2332e3d5e385.tar.bz2 |
* elf.c (_bfd_elf_get_dynamic_reloc_upper_bound)
(_bfd_elf_canonicalize_dynamic_reloc): Find dynamic relocations
even if they are not loaded.
* elflink.c (_bfd_elf_init_2_index_sections): Set data_index_section
first.
* ld-arm/symbian-seg1.s, ld-arm/symbian-seg1.d: New files.
* ld-arm/arm-elf.exp: Run symbian-seg1.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 8 | ||||
-rw-r--r-- | bfd/elf.c | 6 | ||||
-rw-r--r-- | bfd/elflink.c | 12 |
3 files changed, 17 insertions, 9 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d652d97..6253bb5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +2008-04-29 Daniel Jacobowitz <dan@codesourcery.com> + + * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound) + (_bfd_elf_canonicalize_dynamic_reloc): Find dynamic relocations + even if they are not loaded. + * elflink.c (_bfd_elf_init_2_index_sections): Set data_index_section + first. + 2008-04-25 Jay Foad <jay.foad@gmail.com> * reloc16.c (bfd_coff_reloc16_get_value): Add support for @@ -6520,8 +6520,7 @@ _bfd_elf_get_dynamic_reloc_upper_bound (bfd *abfd) ret = sizeof (arelent *); for (s = abfd->sections; s != NULL; s = s->next) - if ((s->flags & SEC_LOAD) != 0 - && elf_section_data (s)->this_hdr.sh_link == elf_dynsymtab (abfd) + if (elf_section_data (s)->this_hdr.sh_link == elf_dynsymtab (abfd) && (elf_section_data (s)->this_hdr.sh_type == SHT_REL || elf_section_data (s)->this_hdr.sh_type == SHT_RELA)) ret += ((s->size / elf_section_data (s)->this_hdr.sh_entsize) @@ -6557,8 +6556,7 @@ _bfd_elf_canonicalize_dynamic_reloc (bfd *abfd, ret = 0; for (s = abfd->sections; s != NULL; s = s->next) { - if ((s->flags & SEC_LOAD) != 0 - && elf_section_data (s)->this_hdr.sh_link == elf_dynsymtab (abfd) + if (elf_section_data (s)->this_hdr.sh_link == elf_dynsymtab (abfd) && (elf_section_data (s)->this_hdr.sh_type == SHT_REL || elf_section_data (s)->this_hdr.sh_type == SHT_RELA)) { diff --git a/bfd/elflink.c b/bfd/elflink.c index 28282f6..de1939a 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -6131,20 +6131,22 @@ _bfd_elf_init_2_index_sections (bfd *output_bfd, struct bfd_link_info *info) { asection *s; + /* Data first, since setting text_index_section changes + _bfd_elf_link_omit_section_dynsym. */ for (s = output_bfd->sections; s != NULL; s = s->next) - if (((s->flags & (SEC_EXCLUDE | SEC_ALLOC | SEC_READONLY)) - == (SEC_ALLOC | SEC_READONLY)) + if (((s->flags & (SEC_EXCLUDE | SEC_ALLOC | SEC_READONLY)) == SEC_ALLOC) && !_bfd_elf_link_omit_section_dynsym (output_bfd, info, s)) { - elf_hash_table (info)->text_index_section = s; + elf_hash_table (info)->data_index_section = s; break; } for (s = output_bfd->sections; s != NULL; s = s->next) - if (((s->flags & (SEC_EXCLUDE | SEC_ALLOC | SEC_READONLY)) == SEC_ALLOC) + if (((s->flags & (SEC_EXCLUDE | SEC_ALLOC | SEC_READONLY)) + == (SEC_ALLOC | SEC_READONLY)) && !_bfd_elf_link_omit_section_dynsym (output_bfd, info, s)) { - elf_hash_table (info)->data_index_section = s; + elf_hash_table (info)->text_index_section = s; break; } |