aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2013-03-30 00:38:39 +0000
committerH.J. Lu <hjl.tools@gmail.com>2013-03-30 00:38:39 +0000
commit61315175ad029ee37a415cb1becd0bfecd44c430 (patch)
treef4c10230237bb2a6786c1dcc5d2159ee382e40a5 /bfd
parentab047a1e0993f63bc3b899ab7efcbd3ac76646ae (diff)
downloadgdb-61315175ad029ee37a415cb1becd0bfecd44c430.zip
gdb-61315175ad029ee37a415cb1becd0bfecd44c430.tar.gz
gdb-61315175ad029ee37a415cb1becd0bfecd44c430.tar.bz2
Set non_ir_ref if a symbol is referenced by a non-shared object
bfd/ PR ld/15323 * elf32-i386.c (elf_i386_check_relocs): Set non_ir_ref if a symbol is referenced by a non-shared object. * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise. ld/testsuite/ PR ld/15323 * ld-plugin/lto.exp (lto_link_tests): Add pr15323a-r.o. (lto_run_tests): Add a test for PR ld/15323. * ld-plugin/pr15323.out: New file. * ld-plugin/pr15323a.c: Likewise. * ld-plugin/pr15323b.c: Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf32-i386.c3
-rw-r--r--bfd/elf64-x86-64.c3
3 files changed, 11 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 2153a53..ec62d91 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2013-03-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/15323
+ * elf32-i386.c (elf_i386_check_relocs): Set non_ir_ref if a
+ symbol is referenced by a non-shared object.
+ * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
+
2013-03-28 Joe Seymour <jseymour@codesourcery.com>
* elf32-sh.c (sh_elf_relocate_section): Suppress warnings for
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index f898a5c..2609130 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1,6 +1,6 @@
/* Intel 80386/80486-specific support for 32-bit ELF
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+ 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -1514,6 +1514,7 @@ elf_i386_check_relocs (bfd *abfd,
/* It is referenced by a non-shared object. */
h->ref_regular = 1;
+ h->root.non_ir_ref = 1;
}
if (! elf_i386_tls_transition (info, abfd, sec, NULL,
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 1e43ff5..9adc959 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -1,6 +1,6 @@
/* X86-64 specific support for ELF
Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
- 2010, 2011, 2012
+ 2010, 2011, 2012, 2013
Free Software Foundation, Inc.
Contributed by Jan Hubicka <jh@suse.cz>.
@@ -1519,6 +1519,7 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info,
/* It is referenced by a non-shared object. */
h->ref_regular = 1;
+ h->root.non_ir_ref = 1;
}
if (! elf_x86_64_tls_transition (info, abfd, sec, NULL,