This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Commit: PR 23055


On Tue, Apr 17, 2018 at 9:47 AM, Nick Clifton <nickc@redhat.com> wrote:
> Hi Guys,
>
>   I am checking in the attached patch to fix a couple of bugs reported
>   in PR 23055.  I am leaving the x86 bug for H.J. to fix. :-)
>
> Cheers
>   Nick
>
> bfd/ChangeLog
> 2018-04-17  Nick Clifton  <nickc@redhat.com>
>
>         PR 23055
>         * aoutx.h (find_nearest_line): Check that the symbol name exists
>         and is long enough, before attempting to see if it is for a .o
>         file.
>         * hash.c (bfd_hash_hash): Add an assertion that the string is not
>         NULL.
>         * linker.c (bfd_link_hash_lookup): Fail if the table or string are
>         NULL.
>         (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
>         has no name.
>

I checked in this patch to fix x86 ELF linker.

-- 
H.J.
From e4e6a73d26ef82622d3bd190749aad508534abe6 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 17 Apr 2018 18:11:21 -0700
Subject: [PATCH] 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.
---
 bfd/ChangeLog   | 6 ++++++
 bfd/elfxx-x86.c | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index afa66e0c5f..8a9b96608b 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 5f55c948ed..40157b8ed7 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;
-- 
2.14.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]