mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 13:56:22 +08:00
* elf32-cris.c (cris_elf_relocate_section) <case
R_CRIS_32_GOTREL>: When linking a program, don't complain about a symbol from a normal object or an undefined weak symbol.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2003-06-18 Hans-Peter Nilsson <hp@axis.com>
|
||||||
|
|
||||||
|
* elf32-cris.c (cris_elf_relocate_section) <case
|
||||||
|
R_CRIS_32_GOTREL>: When linking a program, don't complain about a
|
||||||
|
symbol from a normal object or an undefined weak symbol.
|
||||||
|
|
||||||
2003-06-18 Alan Modra <amodra@bigpond.net.au>
|
2003-06-18 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
|
* elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
|
||||||
|
@ -1129,8 +1129,15 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case R_CRIS_32_GOTREL:
|
case R_CRIS_32_GOTREL:
|
||||||
/* This relocation must only be performed against local symbols. */
|
/* This relocation must only be performed against local symbols.
|
||||||
if (h != NULL && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
It's also ok when we link a program and the symbol is either
|
||||||
|
defined in an ordinary (non-DSO) object or is undefined weak. */
|
||||||
|
if (h != NULL
|
||||||
|
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||||
|
&& !(!info->shared
|
||||||
|
&& ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
|
||||||
|
|| ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
|
||||||
|
&& h->root.type == bfd_link_hash_undefweak))))
|
||||||
{
|
{
|
||||||
(*_bfd_error_handler)
|
(*_bfd_error_handler)
|
||||||
(_("%s: relocation %s is not allowed for global symbol: `%s' from %s section"),
|
(_("%s: relocation %s is not allowed for global symbol: `%s' from %s section"),
|
||||||
|
Reference in New Issue
Block a user