From: Eric Botcazou Date: Tue, 7 Sep 2004 07:11:06 +0000 (+0000) Subject: Merge from mainline: X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=49c53f1635cfb1acf059fdccc2bf8f3e4c87dce4;p=thirdparty%2Fbinutils-gdb.git Merge from mainline: 2004-08-31 Eric Botcazou * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss. 2004-06-09 Alexandre Oliva * elflink.c (elf_sort_symbol): Compare section id, not pointers. (elf_link_add_object_symbols): Likewise. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 473030392ab..9089d5e59c9 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,13 @@ +2004-09-07 Eric Botcazou + + Merge from mainline: + 2004-08-31 Eric Botcazou + * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss. + + 2004-06-09 Alexandre Oliva + * elflink.c (elf_sort_symbol): Compare section id, not pointers. + (elf_link_add_object_symbols): Likewise. + 2004-08-10 Daniel Jacobowitz * elf.c (assign_file_positions_except_relocs): Revert unintended diff --git a/bfd/elf.c b/bfd/elf.c index 2fcfa980ed0..e3663984e83 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -2022,6 +2022,7 @@ bfd_section_from_elf_index (bfd *abfd, unsigned int index) static struct bfd_elf_special_section const special_sections[] = { { ".bss", 4, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, + { ".gnu.linkonce.b",15, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, { ".comment", 8, 0, SHT_PROGBITS, 0 }, { ".data", 5, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, { ".data1", 6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, diff --git a/bfd/elflink.c b/bfd/elflink.c index 6628db34cce..253efd9a5cd 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -2700,7 +2700,7 @@ elf_sort_symbol (const void *arg1, const void *arg2) return vdiff > 0 ? 1 : -1; else { - long sdiff = h1->root.u.def.section - h2->root.u.def.section; + long sdiff = h1->root.u.def.section->id - h2->root.u.def.section->id; if (sdiff != 0) return sdiff > 0 ? 1 : -1; } @@ -3954,7 +3954,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) i = idx + 1; else { - long sdiff = slook - h->root.u.def.section; + long sdiff = slook->id - h->root.u.def.section->id; if (sdiff < 0) j = idx; else if (sdiff > 0)