From 68c4a57ee620ebf9f537473f39e36f3c894e0879 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 13 Jan 2013 00:30:20 +0000 Subject: [PATCH] Set bfd errror for normal and TLS symbol access * elf32-i386.c (elf_i386_check_relocs): Set bfd errror for normal and TLS symbol access. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. --- bfd/ChangeLog | 6 ++++++ bfd/elf32-i386.c | 1 + bfd/elf64-x86-64.c | 1 + 3 files changed, 8 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0fcbe54b45..ecec502a17 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2013-01-12 H.J. Lu + + * elf32-i386.c (elf_i386_check_relocs): Set bfd errror for + normal and TLS symbol access. + * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. + 2013-01-12 Alan Modra * elf-bfd.h (_bfd_elf_strtab_refcount): Declare. diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index f76c7a7f40..99e8f45c86 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -1642,6 +1642,7 @@ elf_i386_check_relocs (bfd *abfd, (_("%B: `%s' accessed both as normal and " "thread local symbol"), abfd, name); + bfd_set_error (bfd_error_bad_value); return FALSE; } } diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 92bf991387..0d23cc3966 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -1644,6 +1644,7 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, (*_bfd_error_handler) (_("%B: '%s' accessed both as normal and thread local symbol"), abfd, name); + bfd_set_error (bfd_error_bad_value); return FALSE; } } -- 2.34.1