mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 22:48:57 +08:00
* config/tc-sh.c (md_apply_fix): For ELF, do not "adjust back" VAL
for weak symbols.
This commit is contained in:
@ -4,6 +4,9 @@
|
|||||||
* as.c (parse_args) <std_longopts>: Add comment about the need to
|
* as.c (parse_args) <std_longopts>: Add comment about the need to
|
||||||
check OPTION_MD_BASE in as.h.
|
check OPTION_MD_BASE in as.h.
|
||||||
|
|
||||||
|
* config/tc-sh.c (md_apply_fix): For ELF, do not "adjust back" VAL
|
||||||
|
for weak symbols.
|
||||||
|
|
||||||
2000-10-27 Nick Clifton <nickc@redhat.com>
|
2000-10-27 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* configure.in (emulations): Add m68hc12.
|
* configure.in (emulations): Add m68hc12.
|
||||||
|
@ -2767,8 +2767,17 @@ md_apply_fix (fixP, val)
|
|||||||
/* The function adjust_reloc_syms won't convert a reloc against a weak
|
/* The function adjust_reloc_syms won't convert a reloc against a weak
|
||||||
symbol into a reloc against a section, but bfd_install_relocation
|
symbol into a reloc against a section, but bfd_install_relocation
|
||||||
will screw up if the symbol is defined, so we have to adjust val here
|
will screw up if the symbol is defined, so we have to adjust val here
|
||||||
to avoid the screw up later. */
|
to avoid the screw up later.
|
||||||
if (fixP->fx_addsy != NULL
|
|
||||||
|
For ordinary relocs, this does not happen for ELF, since for ELF,
|
||||||
|
bfd_install_relocation uses the "special function" field of the
|
||||||
|
howto, and does not execute the code that needs to be undone, as long
|
||||||
|
as the special function does not return bfd_reloc_continue.
|
||||||
|
It can happen for GOT- and PLT-type relocs the way they are
|
||||||
|
described in elf32-sh.c as they use bfd_elf_generic_reloc, but it
|
||||||
|
doesn't matter here since those relocs don't use VAL; see below. */
|
||||||
|
if (OUTPUT_FLAVOR != bfd_target_elf_flavour
|
||||||
|
&& fixP->fx_addsy != NULL
|
||||||
&& S_IS_WEAK (fixP->fx_addsy))
|
&& S_IS_WEAK (fixP->fx_addsy))
|
||||||
val -= S_GET_VALUE (fixP->fx_addsy);
|
val -= S_GET_VALUE (fixP->fx_addsy);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user