diff options
Diffstat (limited to 'gold/testsuite')
-rw-r--r-- | gold/testsuite/Makefile.am | 4 | ||||
-rw-r--r-- | gold/testsuite/Makefile.in | 4 | ||||
-rwxr-xr-x | gold/testsuite/gnu_property_test.sh | 20 |
3 files changed, 24 insertions, 4 deletions
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am index 0644e23..026d101 100644 --- a/gold/testsuite/Makefile.am +++ b/gold/testsuite/Makefile.am @@ -3306,9 +3306,9 @@ check_SCRIPTS += gnu_property_test.sh check_DATA += gnu_property_test.stdout MOSTLYCLEANFILES += gnu_property_test gnu_property_test.stdout: gnu_property_test - $(TEST_READELF) -n $< >$@ + $(TEST_READELF) -lhSWn $< >$@ gnu_property_test: gcctestdir/ld gnu_property_a.o gnu_property_b.o gnu_property_c.o - gcctestdir/ld -o $@ gnu_property_a.o gnu_property_b.o gnu_property_c.o + gcctestdir/ld --build-id -o $@ gnu_property_a.o gnu_property_b.o gnu_property_c.o gnu_property_main.o: gnu_property_main.c $(COMPILE) -c -o $@ $< gnu_property_a.o: gnu_property_a.S diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in index dfcafcd..35c442e 100644 --- a/gold/testsuite/Makefile.in +++ b/gold/testsuite/Makefile.in @@ -9525,9 +9525,9 @@ uninstall-am: @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_x86_64_bnd_2.o: exception_test_2.cc gcctestdir/as @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -c -Wa,-madd-bnd-prefix -o $@ $< @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@gnu_property_test.stdout: gnu_property_test -@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -n $< >$@ +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -lhSWn $< >$@ @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@gnu_property_test: gcctestdir/ld gnu_property_a.o gnu_property_b.o gnu_property_c.o -@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld -o $@ gnu_property_a.o gnu_property_b.o gnu_property_c.o +@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld --build-id -o $@ gnu_property_a.o gnu_property_b.o gnu_property_c.o @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@gnu_property_main.o: gnu_property_main.c @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -c -o $@ $< @DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@gnu_property_a.o: gnu_property_a.S diff --git a/gold/testsuite/gnu_property_test.sh b/gold/testsuite/gnu_property_test.sh index 4a2d217..1806d34 100755 --- a/gold/testsuite/gnu_property_test.sh +++ b/gold/testsuite/gnu_property_test.sh @@ -53,8 +53,28 @@ check_count() fi } +check_alignment () +{ + if egrep -q "Class:[ \t]+ELF64" "$1" + then + align=8 + else + align=4 + fi + if ! egrep -q ".note.gnu.property[ \t]+NOTE.*$align$" "$1" + then + echo "Wrong .note.gnu.property alignment in $1:" + egrep ".note.gnu.property[ \t]+NOTE.*$align" "$1" + exit 1 + fi +} + +check_alignment gnu_property_test.stdout + check_count gnu_property_test.stdout "GNU\s*0x[0-9a-f]*\s*NT_GNU_PROPERTY_TYPE_0" 1 +check_count gnu_property_test.stdout "^ NOTE" 2 + check gnu_property_test.stdout "stack size: 0x111100" check gnu_property_test.stdout "no copy on protected" check gnu_property_test.stdout "x86 ISA used: i486, SSE2, SSE4_2, AVX512CD" |