[binutils-gdb] x86: Use a normal input file with compatible relocation

H.J.Lu hjl@sourceware.org
Wed Apr 18 01:12:00 GMT 2018


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e4e6a73d26ef82622d3bd190749aad508534abe6

commit e4e6a73d26ef82622d3bd190749aad508534abe6
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Apr 17 18:11:21 2018 -0700

    x86: Use a normal input file with compatible relocation
    
    Use a normal input file with compatible relocation to hold linker
    created sections,
    
    	PR ld/23055
    	* elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
    	normal input file with compatible relocation.

Diff:
---
 bfd/ChangeLog   | 6 ++++++
 bfd/elfxx-x86.c | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index afa66e0..8a9b966 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2018-04-17  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR ld/23055
+	* elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
+	normal input file with compatible relocation.
+
 2018-04-18  Alan Modra  <amodra@gmail.com>
 
 	* Makefile.am: Remove support for assorted i386 aout and coff targets.
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index 5f55c94..40157b8 100644
--- a/bfd/elfxx-x86.c
+++ b/bfd/elfxx-x86.c
@@ -2518,7 +2518,9 @@ error_alignment:
 	       abfd = abfd->link.next)
 	    if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
 		&& (abfd->flags
-		    & (DYNAMIC | BFD_LINKER_CREATED | BFD_PLUGIN)) == 0)
+		    & (DYNAMIC | BFD_LINKER_CREATED | BFD_PLUGIN)) == 0
+		&& bed->relocs_compatible (abfd->xvec,
+					   info->output_bfd->xvec))
 	      {
 		htab->elf.dynobj = abfd;
 		dynobj = abfd;



More information about the Binutils-cvs mailing list