2004-11-24 Paul Brook <paul@codesourcery.com>
bfd/ * elf.c (assign_section_numbers): Number SHT_GROUP sections first. gas/testsuite/ * gas/elf/group0a.d: Adjust expected secion ordering. * gas/elf/group1a.d: Ditto. * gas/elf/section4.d: Ditto.
This commit is contained in:
parent
7a851328ae
commit
47cc2cf519
6 changed files with 37 additions and 8 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2004-11-24 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
|
* elf.c (assign_section_numbers): Number SHT_GROUP sections first.
|
||||||
|
|
||||||
2004-11-24 Paul Brook <paul@codesourcery.com>
|
2004-11-24 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
* elf32-arm.c (elf32_arm_swap_symbol_in): New function.
|
* elf32-arm.c (elf32_arm_swap_symbol_in): New function.
|
||||||
|
|
25
bfd/elf.c
25
bfd/elf.c
|
@ -2725,18 +2725,35 @@ assign_section_numbers (bfd *abfd)
|
||||||
unsigned int section_number, secn;
|
unsigned int section_number, secn;
|
||||||
Elf_Internal_Shdr **i_shdrp;
|
Elf_Internal_Shdr **i_shdrp;
|
||||||
bfd_size_type amt;
|
bfd_size_type amt;
|
||||||
|
struct bfd_elf_section_data *d;
|
||||||
|
|
||||||
section_number = 1;
|
section_number = 1;
|
||||||
|
|
||||||
_bfd_elf_strtab_clear_all_refs (elf_shstrtab (abfd));
|
_bfd_elf_strtab_clear_all_refs (elf_shstrtab (abfd));
|
||||||
|
|
||||||
|
/* Put SHT_GROUP sections first. */
|
||||||
for (sec = abfd->sections; sec; sec = sec->next)
|
for (sec = abfd->sections; sec; sec = sec->next)
|
||||||
{
|
{
|
||||||
struct bfd_elf_section_data *d = elf_section_data (sec);
|
d = elf_section_data (sec);
|
||||||
|
|
||||||
if (section_number == SHN_LORESERVE)
|
if (d->this_hdr.sh_type == SHT_GROUP)
|
||||||
section_number += SHN_HIRESERVE + 1 - SHN_LORESERVE;
|
{
|
||||||
d->this_idx = section_number++;
|
if (section_number == SHN_LORESERVE)
|
||||||
|
section_number += SHN_HIRESERVE + 1 - SHN_LORESERVE;
|
||||||
|
d->this_idx = section_number++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (sec = abfd->sections; sec; sec = sec->next)
|
||||||
|
{
|
||||||
|
d = elf_section_data (sec);
|
||||||
|
|
||||||
|
if (d->this_hdr.sh_type != SHT_GROUP)
|
||||||
|
{
|
||||||
|
if (section_number == SHN_LORESERVE)
|
||||||
|
section_number += SHN_HIRESERVE + 1 - SHN_LORESERVE;
|
||||||
|
d->this_idx = section_number++;
|
||||||
|
}
|
||||||
_bfd_elf_strtab_addref (elf_shstrtab (abfd), d->this_hdr.sh_name);
|
_bfd_elf_strtab_addref (elf_shstrtab (abfd), d->this_hdr.sh_name);
|
||||||
if ((sec->flags & SEC_RELOC) == 0)
|
if ((sec->flags & SEC_RELOC) == 0)
|
||||||
d->rel_idx = 0;
|
d->rel_idx = 0;
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2004-11-24 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
|
* gas/elf/group0a.d: Adjust expected secion ordering.
|
||||||
|
* gas/elf/group1a.d: Ditto.
|
||||||
|
* gas/elf/section4.d: Ditto.
|
||||||
|
|
||||||
2004-11-24 Nick Clifton <nickc@redhat.com>
|
2004-11-24 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* gas/iq2000/allinsn.exp: Remove IQ10 tests.
|
* gas/iq2000/allinsn.exp: Remove IQ10 tests.
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
#name: group section
|
#name: group section
|
||||||
#source: group0.s
|
#source: group0.s
|
||||||
|
|
||||||
|
#...
|
||||||
|
[ ]*\[.*\][ ]+\.foo_group[ ]+GROUP.*
|
||||||
#...
|
#...
|
||||||
[ ]*\[.*\][ ]+\.foo[ ]+PROGBITS.*[ ]+AXG[ ]+.*
|
[ ]*\[.*\][ ]+\.foo[ ]+PROGBITS.*[ ]+AXG[ ]+.*
|
||||||
[ ]*\[.*\][ ]+\.bar[ ]+PROGBITS.*[ ]+AG[ ]+.*
|
[ ]*\[.*\][ ]+\.bar[ ]+PROGBITS.*[ ]+AG[ ]+.*
|
||||||
[ ]*\[.*\][ ]+\.foo_group[ ]+GROUP.*
|
|
||||||
#pass
|
#pass
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
#name: group section with multiple sections of same name
|
#name: group section with multiple sections of same name
|
||||||
#source: group1.s
|
#source: group1.s
|
||||||
|
|
||||||
|
#...
|
||||||
|
[ ]*\[.*\][ ]+\.foo_group[ ]+GROUP.*
|
||||||
#...
|
#...
|
||||||
[ ]*\[.*\][ ]+\.text[ ]+PROGBITS.*[ ]+AX[ ]+.*
|
[ ]*\[.*\][ ]+\.text[ ]+PROGBITS.*[ ]+AX[ ]+.*
|
||||||
#...
|
#...
|
||||||
[ ]*\[.*\][ ]+\.text[ ]+PROGBITS.*[ ]+AXG[ ]+.*
|
[ ]*\[.*\][ ]+\.text[ ]+PROGBITS.*[ ]+AXG[ ]+.*
|
||||||
[ ]*\[.*\][ ]+\.foo_group[ ]+GROUP.*
|
|
||||||
#pass
|
#pass
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
#readelf: --sections
|
#readelf: --sections
|
||||||
#name: label arithmetic with multiple same-name sections
|
#name: label arithmetic with multiple same-name sections
|
||||||
|
|
||||||
|
#...
|
||||||
|
[ ]*\[.*\][ ]+foo[ ]+GROUP.*
|
||||||
#...
|
#...
|
||||||
[ ]*\[.*\][ ]+\.text[ ]+PROGBITS.*
|
[ ]*\[.*\][ ]+\.text[ ]+PROGBITS.*
|
||||||
#...
|
#...
|
||||||
[ ]*\[.*\][ ]+\.data[ ]+PROGBITS.*
|
[ ]*\[.*\][ ]+\.data[ ]+PROGBITS.*
|
||||||
#...
|
#...
|
||||||
[ ]*\[.*\][ ]+\.text[ ]+PROGBITS.*
|
[ ]*\[.*\][ ]+\.text[ ]+PROGBITS.*
|
||||||
#...
|
|
||||||
[ ]*\[.*\][ ]+foo[ ]+GROUP.*
|
|
||||||
#pass
|
#pass
|
||||||
|
|
Loading…
Reference in a new issue