* 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 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
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: