From 7b7e7f1da28585cfa49cbced50dbbd75a143cd20 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 26 Oct 2015 16:32:34 -0700 Subject: Check symbol defined by assignment in linker script Symbol symbol defined by an assignment in a linker script has type bfd_link_hash_new. elf_i386_convert_load and elf_x86_64_convert_load should check bfd_link_hash_new to see if a symbol is defined by a linker script. bfd/ PR ld/19175 * elf32-i386.c (elf_i386_convert_load): Check bfd_link_hash_new instead of calling bfd_link_get_defined_symbol. * elf64-x86-64.c (elf_x86_64_convert_load): Likewise. Skip relocation overflow for bfd_link_hash_new. * linker.c (bfd_link_get_defined_symbol): Removed. * bfd-in2.h: Regenerated. ld/testsuite/ PR ld/19175 * ld-i386/i386.exp: Run pr19175. * ld-x86-64/x86-64.exp: Likewise. * ld-i386/pr19175.d: New file. * ld-i386/pr19175.s: Likewise. * ld-i386/pr19175.t: Likewise. * ld-x86-64/pr19175.d: Likewise. * ld-x86-64/pr19175.s: Likewise. * ld-x86-64/pr19175.t: Likewise. --- bfd/bfd-in2.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'bfd/bfd-in2.h') diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 57d31f2..9345e88 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -7515,10 +7515,6 @@ struct bfd_elf_version_tree * bfd_find_version_for_sym bfd_boolean bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); -bfd_boolean bfd_link_get_defined_symbol - (struct bfd_link_info *info, struct bfd_link_hash_entry *h, - asection **sec, bfd_vma *value); - /* Extracted from simple.c. */ bfd_byte *bfd_simple_get_relocated_section_contents (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table); -- cgit v1.1