This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [ld, testsuite] Relax the expectation pattern for several plugin-* tests
- From: Jiong Wang <jiong dot wang at foss dot arm dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, Binutils <binutils at sourceware dot org>
- Date: Thu, 16 Feb 2017 10:16:16 +0000
- Subject: Re: [ld, testsuite] Relax the expectation pattern for several plugin-* tests
- Authentication-results: sourceware.org; auth=none
- References: <20150205135440.GA27203@gmail.com> <20150207094240.GD14796@bubble.grove.modra.org> <CAMe9rOoC1KKOHtPT81fFAnU8sjHWO0BLjG2=XoGU=b1oiuR10g@mail.gmail.com> <CAMe9rOo_u9VL2KjczbppH7C8Kv-j6-EOvPrB12Vw65Ro_mg4+g@mail.gmail.com> <54E61565.2090008@arm.com> <CAMe9rOr+xobuKsKDK1fHJXZ0qCtVSjy6=jzFbiXBuceLwvu1YQ@mail.gmail.com> <CAMe9rOpsjqOKz4pi9k8sCn_ESUeEnFE0zF5EsF9-74TQ4h+zRA@mail.gmail.com> <355e66f1-d3f6-25e6-1f07-d60fdc7122cf@foss.arm.com> <CAMe9rOqfBhyGq_ea-vhUWUgvc2F+b=Gh2TjPwXDeu1bAk=PR5g@mail.gmail.com> <8e8ac1ef-5410-9251-f6dd-7dc960b65967@foss.arm.com> <20170215234229.GH3731@bubble.grove.modra.org>
On 15/02/17 23:42, Alan Modra wrote:
On Wed, Feb 15, 2017 at 05:46:46PM +0000, Jiong Wang wrote:
On 13/02/17 16:57, H.J. Lu wrote:
I agree that ARM linker shouldn't complain IR symbols in this case.
Can you update ARM linker like this?
Hmm, I saw BFD_PLUGIN is set together with BFD_LINKER_CREATED, so the current
check in INTERWORK_FLAG should have covered this. While it is not, so I guess
in some place bfd linker dropped the BFD_LINKER_CREATED bit.
Some search in the code, it looks to me we should also save "BFD_LINKER_CREATED"
in BFD_FLAGS_SAVED in bfd.c/bfd-in2.h? I have made this change locally, and
these failures gone away on arm native ld check without regression.
A patch to add that to BFD_FLAGS_SAVED in bfd.c is preapproved.
Thanks. Committed attached patch after x86/arm native check-ld/as/binutils OK.
I followed BFD_FLAGS_FOR_BFD_USE_MASK to put BFD_LINKER_CREATED and BFD_PLUGIN together.
bfd/
2017-02-16 Jiong Wang <jiong.wang@arm.com>
* bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
* bfd-in2.h: Regenerated.
commit 905712060597d0c7a13ffccbca40330c7ad3e3a8
Author: Jiong Wang <jiong.wang@arm.com>
Date: Thu Feb 16 09:40:03 2017 +0000
[Patch] Add BFD_LINKER_CREATED to BFD_FLAGS_SAVED
bfd/
* bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
* bfd-in2.h: Regenerated.
Bug exposed by https://sourceware.org/ml/binutils/2017-02/msg00128.html
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 789915c..a6a4c64 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2017-02-16 Jiong Wang <jiong.wang@arm.com>
+
+ * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
+ * bfd-in2.h: Regenerated.
+
2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
PR ld/21168
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 80d60cb..f90bb8c 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -6806,8 +6806,9 @@ struct bfd
/* Flags bits to be saved in bfd_preserve_save. */
#define BFD_FLAGS_SAVED \
- (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN \
- | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON)
+ (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
+ | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \
+ | BFD_USE_ELF_STT_COMMON)
/* Flags bits which are for BFD use only. */
#define BFD_FLAGS_FOR_BFD_USE_MASK \
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 1607f39..a9402e48 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -180,8 +180,9 @@ CODE_FRAGMENT
.
. {* Flags bits to be saved in bfd_preserve_save. *}
.#define BFD_FLAGS_SAVED \
-. (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_PLUGIN \
-. | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON | BFD_USE_ELF_STT_COMMON)
+. (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \
+. | BFD_PLUGIN | BFD_COMPRESS_GABI | BFD_CONVERT_ELF_COMMON \
+. | BFD_USE_ELF_STT_COMMON)
.
. {* Flags bits which are for BFD use only. *}
.#define BFD_FLAGS_FOR_BFD_USE_MASK \