PR 10843
authorIan Lance Taylor <ian@airs.com>
Wed, 30 Dec 2009 20:35:52 +0000 (20:35 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 30 Dec 2009 20:35:52 +0000 (20:35 +0000)
* target-reloc.h (relocate_for_relocatable): When copying a reloc,
if the input symbol index is 0, make the output symbol index 0.

gold/ChangeLog
gold/target-reloc.h

index ea16c7a06128abd032ff46b21e03a9403ceb88e8..3dd3280dab770d02026f43640b27bacf0703bd9e 100644 (file)
@@ -1,3 +1,9 @@
+2009-12-30  Ian Lance Taylor  <iant@google.com>
+
+       PR 10843
+       * target-reloc.h (relocate_for_relocatable): When copying a reloc,
+       if the input symbol index is 0, make the output symbol index 0.
+
 2009-12-30  Ian Lance Taylor  <iant@google.com>
 
        PR 10670
index bc4d1ba1c10495a5709e3aa7078e75f28288bd35..25b3ac435320ee03bf44c9a4841b2f8cf4f97b57 100644 (file)
@@ -503,8 +503,13 @@ relocate_for_relocatable(
          switch (strategy)
            {
            case Relocatable_relocs::RELOC_COPY:
-             new_symndx = object->symtab_index(r_sym);
-             gold_assert(new_symndx != -1U);
+             if (r_sym == 0)
+               new_symndx = 0;
+             else
+               {
+                 new_symndx = object->symtab_index(r_sym);
+                 gold_assert(new_symndx != -1U);
+               }
              break;
 
            case Relocatable_relocs::RELOC_ADJUST_FOR_SECTION_RELA:
This page took 0.045772 seconds and 4 git commands to generate.