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.
This commit is contained in:
H.J. Lu 2020-10-13 05:21:53 -07:00
parent 586e30940e
commit 29700bfff4
5 changed files with 40 additions and 2 deletions

View 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> 2020-10-13 H.J. Lu <hongjiu.lu@intel.com>
* x86_64.cc (Target_x86_64::Target_x86_64): Initialize * x86_64.cc (Target_x86_64::Target_x86_64): Initialize

View File

@ -2044,7 +2044,7 @@ MOSTLYCLEANFILES += justsyms_lib
justsyms_lib.o: justsyms_lib.c justsyms_lib.o: justsyms_lib.c
$(COMPILE) -c -o $@ $< $(COMPILE) -c -o $@ $<
justsyms_lib: justsyms_lib.o gcctestdir/ld 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 check_PROGRAMS += binary_test
MOSTLYCLEANFILES += binary.txt MOSTLYCLEANFILES += binary.txt

View File

@ -8834,7 +8834,7 @@ uninstall-am:
@GCC_TRUE@@NATIVE_LINKER_TRUE@justsyms_lib.o: justsyms_lib.c @GCC_TRUE@@NATIVE_LINKER_TRUE@justsyms_lib.o: justsyms_lib.c
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -c -o $@ $< @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@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 # Copy the file to the build directory to avoid worrying about the
# full pathname in the generated symbols. # full pathname in the generated symbols.
@GCC_TRUE@@NATIVE_LINKER_TRUE@binary.txt: $(srcdir)/binary.in @GCC_TRUE@@NATIVE_LINKER_TRUE@binary.txt: $(srcdir)/binary.in

View File

@ -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) }
}

View File

@ -30,5 +30,6 @@ SECTIONS
.sec3 : { *(.sec3) } .sec3 : { *(.sec3) }
.data : { *(.data) } .data : { *(.data) }
.bss : { *(.bss) } .bss : { *(.bss) }
/DISCARD/ : { *(.note.gnu.property) }
} }