aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-10-13 05:21:53 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-10-13 05:22:08 -0700
commit29700bfff45955f1323573a8270625d38e9bdbb6 (patch)
tree91bd0bdc18db55f8825eeec9371c8fcc7d67660f /gold
parent586e30940e640f67bd55bd72e1d1355a4faf8079 (diff)
downloadgdb-29700bfff45955f1323573a8270625d38e9bdbb6.zip
gdb-29700bfff45955f1323573a8270625d38e9bdbb6.tar.gz
gdb-29700bfff45955f1323573a8270625d38e9bdbb6.tar.bz2
gold: Discard .note.gnu.property section
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.
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog9
-rw-r--r--gold/testsuite/Makefile.am2
-rw-r--r--gold/testsuite/Makefile.in2
-rw-r--r--gold/testsuite/justsyms_lib.t28
-rw-r--r--gold/testsuite/script_test_10.t1
5 files changed, 40 insertions, 2 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 41fe6e0..b9f6f9e 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,5 +1,14 @@
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
feature_2_used_, feature_2_needed_ and object_feature_2_used_.
(Target_x86_64::feature_2_used_): New data member.
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index 026d101..c2692f9 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -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
diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in
index 35c442e..7f2e0dc 100644
--- a/gold/testsuite/Makefile.in
+++ b/gold/testsuite/Makefile.in
@@ -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
index 0000000..632f7cd
--- /dev/null
+++ b/gold/testsuite/justsyms_lib.t
@@ -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) }
+}
diff --git a/gold/testsuite/script_test_10.t b/gold/testsuite/script_test_10.t
index eff0b05..a9fc72d 100644
--- a/gold/testsuite/script_test_10.t
+++ b/gold/testsuite/script_test_10.t
@@ -30,5 +30,6 @@ SECTIONS
.sec3 : { *(.sec3) }
.data : { *(.data) }
.bss : { *(.bss) }
+ /DISCARD/ : { *(.note.gnu.property) }
}