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: [ld, testsuite] Relax the expectation pattern for several plugin-* tests


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 \

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