mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 11:00:01 +08:00
* elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
unresolved_reloc test to exclude cases where we use "relocation" before setting it to point into the .got. Reinstate fudge for unresolved relocs in debugging sections.
This commit is contained in:
@ -1,5 +1,10 @@
|
|||||||
2001-06-23 Alan Modra <amodra@bigpond.net.au>
|
2001-06-23 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
|
||||||
|
unresolved_reloc test to exclude cases where we use "relocation"
|
||||||
|
before setting it to point into the .got. Reinstate fudge for
|
||||||
|
unresolved relocs in debugging sections.
|
||||||
|
|
||||||
* elf32-i386.c (elf_i386_relocate_section): Replace ugly
|
* elf32-i386.c (elf_i386_relocate_section): Replace ugly
|
||||||
complicated tests for unresolvable relocs with a simple direct
|
complicated tests for unresolvable relocs with a simple direct
|
||||||
scheme using "unresolved_reloc" var.
|
scheme using "unresolved_reloc" var.
|
||||||
|
@ -1586,6 +1586,8 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
h->got.offset |= 1;
|
h->got.offset |= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
unresolved_reloc = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1632,7 +1634,6 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
relocation = htab->sgot->output_offset + off;
|
relocation = htab->sgot->output_offset + off;
|
||||||
unresolved_reloc = false;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case R_386_GOTOFF:
|
case R_386_GOTOFF:
|
||||||
@ -1810,7 +1811,15 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unresolved_reloc)
|
/* FIXME: Why do we allow debugging sections to escape this error?
|
||||||
|
More importantly, why do we not emit dynamic relocs for
|
||||||
|
R_386_32 above in debugging sections (which are ! SEC_ALLOC)?
|
||||||
|
If we had emitted the dynamic reloc, we could remove the
|
||||||
|
fudge here. */
|
||||||
|
if (unresolved_reloc
|
||||||
|
&& !(info->shared
|
||||||
|
&& (input_section->flags & SEC_DEBUGGING) != 0
|
||||||
|
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
|
||||||
(*_bfd_error_handler)
|
(*_bfd_error_handler)
|
||||||
(_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
|
(_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
|
||||||
bfd_get_filename (input_bfd),
|
bfd_get_filename (input_bfd),
|
||||||
|
Reference in New Issue
Block a user