]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gold: Discard .note.gnu.property section
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 13 Oct 2020 12:21:53 +0000 (05:21 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 13 Oct 2020 12:22:08 +0000 (05:22 -0700)
Discard .note.gnu.property section since it changes the expected section
order.

PR gold/23503
* testsuite/Makefile.am (justsyms_lib): Pass
-T $(srcdir)/justsyms_lib.t to gold.
* testsuite/Makefile.in: Regenerated.
* testsuite/justsyms_lib.t: New file.
* testsuite/script_test_10.t: Discard .note.gnu.property section.

gold/ChangeLog
gold/testsuite/Makefile.am
gold/testsuite/Makefile.in
gold/testsuite/justsyms_lib.t [new file with mode: 0644]
gold/testsuite/script_test_10.t

index 41fe6e033e95b5bc913ac57c5341e6178d82eda7..b9f6f9e43c55d87c5b1e8dc6058fffaca64ca1be 100644 (file)
@@ -1,3 +1,12 @@
+2020-10-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR gold/23503
+       * testsuite/Makefile.am (justsyms_lib): Pass
+       -T $(srcdir)/justsyms_lib.t to gold.
+       * testsuite/Makefile.in: Regenerated.
+       * testsuite/justsyms_lib.t: New file.
+       * testsuite/script_test_10.t: Discard .note.gnu.property section.
+
 2020-10-13  H.J. Lu  <hongjiu.lu@intel.com>
 
        * x86_64.cc (Target_x86_64::Target_x86_64): Initialize
index 026d1010b0b4cc733dcac858e5cf7391fc77580a..c2692f96776b29c24aea6411e018b6a3f9596692 100644 (file)
@@ -2044,7 +2044,7 @@ MOSTLYCLEANFILES += justsyms_lib
 justsyms_lib.o: justsyms_lib.c
        $(COMPILE) -c -o $@ $<
 justsyms_lib: justsyms_lib.o gcctestdir/ld
-       gcctestdir/ld -o $@ -z norelro -Ttext=0x1000200 -Tdata=0x2000000 -e exported_func justsyms_lib.o
+       gcctestdir/ld -o $@ -z norelro -T $(srcdir)/justsyms_lib.t -Ttext=0x1000200 -Tdata=0x2000000 -e exported_func justsyms_lib.o
 
 check_PROGRAMS += binary_test
 MOSTLYCLEANFILES += binary.txt
index 35c442ee8b7fd116e1940eba60d44ef14c4bddea..7f2e0dcd56244a245c1c0f796c1aabf04eecec27 100644 (file)
@@ -8834,7 +8834,7 @@ uninstall-am:
 @GCC_TRUE@@NATIVE_LINKER_TRUE@justsyms_lib.o: justsyms_lib.c
 @GCC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -c -o $@ $<
 @GCC_TRUE@@NATIVE_LINKER_TRUE@justsyms_lib: justsyms_lib.o gcctestdir/ld
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld -o $@ -z norelro -Ttext=0x1000200 -Tdata=0x2000000 -e exported_func justsyms_lib.o
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld -o $@ -z norelro -T $(srcdir)/justsyms_lib.t -Ttext=0x1000200 -Tdata=0x2000000 -e exported_func justsyms_lib.o
 # Copy the file to the build directory to avoid worrying about the
 # full pathname in the generated symbols.
 @GCC_TRUE@@NATIVE_LINKER_TRUE@binary.txt: $(srcdir)/binary.in
diff --git a/gold/testsuite/justsyms_lib.t b/gold/testsuite/justsyms_lib.t
new file mode 100644 (file)
index 0000000..632f7cd
--- /dev/null
@@ -0,0 +1,28 @@
+/* justsyms_lib.t -- test --just-symbols for gold.
+
+   Copyright (C) 2018 Free Software Foundation, Inc.
+
+   This file is part of gold.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+SECTIONS
+{
+  .text : { *(.text) }
+  .data : { *(.data) }
+  .bss : { *(.bss) }
+  /DISCARD/ : { *(.note.gnu.property) }
+}
index eff0b05f4b52450d2ae1a99423a8f1fea91b99ad..a9fc72ddc02efef55b72614237dfa17f2eca9a63 100644 (file)
@@ -30,5 +30,6 @@ SECTIONS
   .sec3 : { *(.sec3) }
   .data : { *(.data) }
   .bss : { *(.bss) }
+  /DISCARD/ : { *(.note.gnu.property) }
 }