* target-reloc.h (relocate_for_relocatable): When copying a reloc,
	if the input symbol index is 0, make the output symbol index 0.
This commit is contained in:
Ian Lance Taylor 2009-12-30 20:35:52 +00:00
parent ebcc83046f
commit 818bf354a7
2 changed files with 13 additions and 2 deletions

View 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

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