]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Merge from mainline:
authorEric Botcazou <ebotcazou@libertysurf.fr>
Tue, 7 Sep 2004 07:11:06 +0000 (07:11 +0000)
committerEric Botcazou <ebotcazou@libertysurf.fr>
Tue, 7 Sep 2004 07:11:06 +0000 (07:11 +0000)
2004-08-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
* elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.

2004-06-09  Alexandre Oliva  <aoliva@redhat.com>
* elflink.c (elf_sort_symbol): Compare section id, not pointers.
(elf_link_add_object_symbols): Likewise.

bfd/ChangeLog
bfd/elf.c
bfd/elflink.c

index 473030392ab96612c7d808cc131962fa1983fbb2..9089d5e59c9b747685b59284add8f0ee2151c843 100644 (file)
@@ -1,3 +1,13 @@
+2004-09-07  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       Merge from mainline:
+       2004-08-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
+       * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
+
+       2004-06-09  Alexandre Oliva  <aoliva@redhat.com>
+       * elflink.c (elf_sort_symbol): Compare section id, not pointers.
+       (elf_link_add_object_symbols): Likewise.
+
 2004-08-10  Daniel Jacobowitz  <dan@debian.org>
 
        * elf.c (assign_file_positions_except_relocs): Revert unintended
index 2fcfa980ed0ced9d097531ae35a40cbbd6c19702..e3663984e83a95d336919a30649a15f2bf1531eb 100644 (file)
--- 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 },
index 6628db34cce61c1676bab71f79c048f52eba5eb9..253efd9a5cdaa902575e2d8a5411f052e57173f0 100644 (file)
@@ -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)