summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/bfd
diff options
context:
space:
mode:
authorLai Wei-Chih <Robert.Lai@mediatek.com>2014-10-16 13:16:09 +0800
committerLai Wei-Chih <Robert.Lai@mediatek.com>2014-11-28 15:41:20 +0800
commite2b060be9823f53d2acd7bc7b5fe06cc4d940063 (patch)
treecc1f88b3098ddf923a76da9eb9380c699f42bd08 /binutils-2.25/bfd
parentc8e1636493f7d40bb0ba37501e9a6f67cd062a31 (diff)
downloadtoolchain_binutils-e2b060be9823f53d2acd7bc7b5fe06cc4d940063.tar.gz
toolchain_binutils-e2b060be9823f53d2acd7bc7b5fe06cc4d940063.tar.bz2
toolchain_binutils-e2b060be9823f53d2acd7bc7b5fe06cc4d940063.zip
[2.24][2.25] Backport prevent user links ARM ELF binary into an AARCH64 ELF executable.
Prevent the linker from generating a seg-fault when the user attempts to link an ARM ELF binary into an AARCH64 ELF executable. 2014-03-12 Nick Clifton <nickc@redhat.com> PR ld/16671 * elf32-arm.c (elf32_arm_add_symbol_hook): Check for ARM format before testing for vxworks. Change-Id: Ibc81a168b85f70422d428d857b8de0c71e2824ed
Diffstat (limited to 'binutils-2.25/bfd')
-rw-r--r--binutils-2.25/bfd/elf32-arm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/binutils-2.25/bfd/elf32-arm.c b/binutils-2.25/bfd/elf32-arm.c
index 197af595..9c31ddd7 100644
--- a/binutils-2.25/bfd/elf32-arm.c
+++ b/binutils-2.25/bfd/elf32-arm.c
@@ -15700,6 +15700,9 @@ elf32_arm_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
|| ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE))
elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
+ if (elf32_arm_hash_table (info) == NULL)
+ return FALSE;
+
if (elf32_arm_hash_table (info)->vxworks_p
&& !elf_vxworks_add_symbol_hook (abfd, info, sym, namep,
flagsp, secp, valp))