From: "H.J. Lu" <hjl.tools@gmail.com>
To: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
Cc: Binutils <binutils@sourceware.org>
Subject: Re: [PATCH] Set dynobj to a normal input file if possible
Date: Fri, 22 Apr 2016 04:50:00 -0000 [thread overview]
Message-ID: <CAMe9rOpX+VFKE6GvwNkUW9xE2UDhczWh=YR3FNjy=Do7Ri0LWA@mail.gmail.com> (raw)
In-Reply-To: <201604220339.u3M3dtEo021701@ignucius.se.axis.com>
[-- Attachment #1: Type: text/plain, Size: 1347 bytes --]
On Thu, Apr 21, 2016 at 8:39 PM, Hans-Peter Nilsson
<hans-peter.nilsson@axis.com> wrote:
>> Date: Wed, 20 Apr 2016 20:31:50 -0700
>> From: "H.J. Lu" <hongjiu.lu@intel.com>
>
>> * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
>> normal input file if possible.
>
> Looks like this caused, for a cross -m32 build to arm-unknown-eabi:
>
> Running /tmp/hpautotest-binutils/bsrc/src/ld/testsuite/ld-arm/arm-elf.exp ...
> FAIL: Indirect cross-library function reference
> FAIL: TLS dynamic application
> FAIL: GOT relocations in executables
> FAIL: Thumb and -gc-sections
> FAIL: Simple dynamic application
> FAIL: Simple dynamic application without .rel.plt in linker script
> FAIL: Non-pcrel function reference
> FAIL: Mixed ARM/Thumb dynamic application
> FAIL: Mixed ARM/Thumb arch5 dynamic application
> FAIL: Using Thumb lib by another lib
> FAIL: MOVW/MOVT against shared libraries
> FAIL: Mixed ARM/Thumb dynamic application with farcalls
> FAIL: Mixed ARM/Thumb arch5 dynamic application with farcalls
> FAIL: TLS long plt
> FAIL: IFUNC test 7
> FAIL: IFUNC test 8
> FAIL: IFUNC test 9
> FAIL: IFUNC test 10
> FAIL: IFUNC test 13
> FAIL: IFUNC test 14
> FAIL: IFUNC test 15
> FAIL: IFUNC test 16
> FAIL: Preempt Thumb symbol
> FAIL: ld-arm/unresolved-1-dyn
>
> brgds, H-P
I checked in this fix. Sorry that.
--
H.J.
[-- Attachment #2: 0001-Exclude-linker-created-file-from-dynobj.patch --]
[-- Type: text/x-patch, Size: 1362 bytes --]
From 6645479e9dc9470d22393d5bc4ef2ef2d391e848 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Thu, 21 Apr 2016 21:45:57 -0700
Subject: [PATCH] Exclude linker created file from dynobj
Some ELF targets create a "linker stubs" fake bfd. Don't use it to
set dynobj.
* elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker
created file from dynobj.
---
bfd/ChangeLog | 5 +++++
bfd/elflink.c | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d668652..a8a29bd 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
+ * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker
+ created file from dynobj.
+
+2016-04-21 H.J. Lu <hongjiu.lu@intel.com>
+
* elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
normal input file if possible.
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 13233cb..6f67266 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -213,7 +213,8 @@ _bfd_elf_link_create_dynstrtab (bfd *abfd, struct bfd_link_info *info)
{
bfd *ibfd;
for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link.next)
- if ((ibfd->flags & (DYNAMIC | BFD_PLUGIN)) == 0)
+ if ((ibfd->flags
+ & (DYNAMIC | BFD_LINKER_CREATED | BFD_PLUGIN)) == 0)
{
abfd = ibfd;
break;
--
2.5.5
next prev parent reply other threads:[~2016-04-22 4:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-21 3:32 H.J. Lu
2016-04-22 0:33 ` Alan Modra
2016-04-22 3:41 ` Hans-Peter Nilsson
2016-04-22 4:50 ` H.J. Lu [this message]
2016-04-22 8:55 ` Alan Modra
2016-04-22 12:35 ` H.J. Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMe9rOpX+VFKE6GvwNkUW9xE2UDhczWh=YR3FNjy=Do7Ri0LWA@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=binutils@sourceware.org \
--cc=hans-peter.nilsson@axis.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).