mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 06:17:47 +08:00
Check info->executable for symbols which need copy relocs
* elf64-x86-64.c (elf_x86_64_relocate_section): Check info->executable for symbols which need copy relocs.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2014-12-02 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* elf64-x86-64.c (elf_x86_64_relocate_section): Check
|
||||||
|
info->executable for symbols which need copy relocs.
|
||||||
|
|
||||||
2014-12-02 H.J. Lu <hongjiu.lu@intel.com>
|
2014-12-02 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* elf64-x86-64.c (elf_x86_64_check_relocs): Revert the last
|
* elf64-x86-64.c (elf_x86_64_check_relocs): Revert the last
|
||||||
|
@ -4059,7 +4059,7 @@ elf_x86_64_relocate_section (bfd *output_bfd,
|
|||||||
defined locally or for a branch. */
|
defined locally or for a branch. */
|
||||||
fail = !h->def_regular && !branch;
|
fail = !h->def_regular && !branch;
|
||||||
}
|
}
|
||||||
else if (!h->needs_copy)
|
else if (!(info->executable && h->needs_copy))
|
||||||
{
|
{
|
||||||
/* Symbol doesn't need copy reloc and isn't referenced
|
/* Symbol doesn't need copy reloc and isn't referenced
|
||||||
locally. We only allow branch to symbol with
|
locally. We only allow branch to symbol with
|
||||||
@ -4120,7 +4120,8 @@ direct:
|
|||||||
/* Don't copy a pc-relative relocation into the output file
|
/* Don't copy a pc-relative relocation into the output file
|
||||||
if the symbol needs copy reloc. */
|
if the symbol needs copy reloc. */
|
||||||
if ((info->shared
|
if ((info->shared
|
||||||
&& !(h != NULL
|
&& !(info->executable
|
||||||
|
&& h != NULL
|
||||||
&& h->needs_copy
|
&& h->needs_copy
|
||||||
&& IS_X86_64_PCREL_TYPE (r_type))
|
&& IS_X86_64_PCREL_TYPE (r_type))
|
||||||
&& (h == NULL
|
&& (h == NULL
|
||||||
|
Reference in New Issue
Block a user