summaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2008-04-29 11:53:45 +0000
committerDaniel Jacobowitz <dan@debian.org>2008-04-29 11:53:45 +0000
commit87b384ae27b2b27d56e08587dbc5ecd0b7091966 (patch)
tree4be9f26c321bfeadeaa32dd8272b9201e24e0aae /bfd/elflink.c
parentaa36eafa4543ba4532b36b0afc285bbb2466d087 (diff)
downloadgdb-87b384ae27b2b27d56e08587dbc5ecd0b7091966.tar.gz
* 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/elflink.c')
-rw-r--r--bfd/elflink.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 28282f6c97f..de1939ac7c8 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;
}