From 9f8575350f980aa6da8c488c6aa30862620eaa1f Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 12 Oct 2017 02:12:47 -0700 Subject: x86: Add _bfd_x86_elf_hide_symbol When there is no dynamic interpreter in PIE, make the undefined weak symbol dynamic so that PC relative branch to the undefined weak symbol will land to address 0. * elf32-i386.c (elf_backend_hide_symbol): New. * elf64-x86-64.c (elf_backend_hide_symbol): Likewise. * elfxx-x86.c (_bfd_x86_elf_hide_symbol): Likewise. * elfxx-x86.h (_bfd_x86_elf_hide_symbol): Likewise. --- bfd/elfxx-x86.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bfd/elfxx-x86.h') diff --git a/bfd/elfxx-x86.h b/bfd/elfxx-x86.h index a2f5fc2..542439c 100644 --- a/bfd/elfxx-x86.h +++ b/bfd/elfxx-x86.h @@ -621,6 +621,9 @@ extern bfd_boolean _bfd_x86_elf_hash_symbol extern bfd_boolean _bfd_x86_elf_adjust_dynamic_symbol (struct bfd_link_info *, struct elf_link_hash_entry *); +extern void _bfd_x86_elf_hide_symbol + (struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean); + extern bfd_boolean _bfd_x86_elf_link_symbol_references_local (struct bfd_link_info *, struct elf_link_hash_entry *); -- cgit v1.1