Module Name: src
Committed By: riastradh
Date: Sun Jul 7 17:37:33 UTC 2024
Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi
src/tests/libexec/ld.elf_so: Makefile
Log Message:
t_ifunc: Test with all combinations of {relro, bindnow}.
PR lib/57792
To generate a diff of this commit:
cvs rdiff -u -r1.436 -r1.437 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.1325 -r1.1326 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.21 -r1.22 src/tests/libexec/ld.elf_so/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/sets/lists/debug/mi
diff -u src/distrib/sets/lists/debug/mi:1.436 src/distrib/sets/lists/debug/mi:1.437
--- src/distrib/sets/lists/debug/mi:1.436 Mon Jul 1 04:03:04 2024
+++ src/distrib/sets/lists/debug/mi Sun Jul 7 17:37:33 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.436 2024/07/01 04:03:04 mrg Exp $
+# $NetBSD: mi,v 1.437 2024/07/07 17:37:33 riastradh Exp $
./etc/mtree/set.debug comp-sys-root
./usr/lib comp-sys-usr compatdir
./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib
@@ -2419,6 +2419,9 @@
./usr/libdata/debug/usr/tests/libexec/ld.elf_so/t_dlvsym.debug tests-libexec-debug debug,atf,pic,compattestfile
./usr/libdata/debug/usr/tests/libexec/ld.elf_so/t_hash.debug tests-libexec-debug debug,atf,pic,compattestfile
./usr/libdata/debug/usr/tests/libexec/ld.elf_so/t_ifunc.debug tests-libexec-debug debug,atf,pic,compattestfile
+./usr/libdata/debug/usr/tests/libexec/ld.elf_so/t_ifunc_norelro.debug tests-libexec-debug debug,atf,pic,compattestfile
+./usr/libdata/debug/usr/tests/libexec/ld.elf_so/t_ifunc_norelro_now.debug tests-libexec-debug debug,atf,pic,compattestfile
+./usr/libdata/debug/usr/tests/libexec/ld.elf_so/t_ifunc_now.debug tests-libexec-debug debug,atf,pic,compattestfile
./usr/libdata/debug/usr/tests/libexec/ld.elf_so/t_rtld_r_debug.debug tests-libexec-debug debug,atf,pic,compattestfile
./usr/libdata/debug/usr/tests/libexec/ld.elf_so/t_tls_extern.debug tests-libexec-debug debug,atf,pic,compattestfile
./usr/libdata/debug/usr/tests/net/bpf/t_bpf.debug tests-net-debug debug,atf,rump
Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.1325 src/distrib/sets/lists/tests/mi:1.1326
--- src/distrib/sets/lists/tests/mi:1.1325 Mon Jul 1 21:24:05 2024
+++ src/distrib/sets/lists/tests/mi Sun Jul 7 17:37:33 2024
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1325 2024/07/01 21:24:05 rillig Exp $
+# $NetBSD: mi,v 1.1326 2024/07/07 17:37:33 riastradh Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -4228,6 +4228,9 @@
./usr/tests/libexec/ld.elf_so/t_dlvsym tests-libexec-tests compattestfile,atf,pic
./usr/tests/libexec/ld.elf_so/t_hash tests-libexec-tests compattestfile,atf,pic
./usr/tests/libexec/ld.elf_so/t_ifunc tests-libexec-tests compattestfile,atf,pic
+./usr/tests/libexec/ld.elf_so/t_ifunc_norelro tests-libexec-tests compattestfile,atf,pic
+./usr/tests/libexec/ld.elf_so/t_ifunc_norelro_now tests-libexec-tests compattestfile,atf,pic
+./usr/tests/libexec/ld.elf_so/t_ifunc_now tests-libexec-tests compattestfile,atf,pic
./usr/tests/libexec/ld.elf_so/t_rtld_r_debug tests-libexec-tests compattestfile,atf,pic
./usr/tests/libexec/ld.elf_so/t_thread_local_dtor tests-libexec-tests compattestfile,atf,pic
./usr/tests/libexec/ld.elf_so/t_tls_extern tests-libexec-tests compattestfile,atf,pic
Index: src/tests/libexec/ld.elf_so/Makefile
diff -u src/tests/libexec/ld.elf_so/Makefile:1.21 src/tests/libexec/ld.elf_so/Makefile:1.22
--- src/tests/libexec/ld.elf_so/Makefile:1.21 Sun Jul 30 09:22:02 2023
+++ src/tests/libexec/ld.elf_so/Makefile Sun Jul 7 17:37:33 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2023/07/30 09:22:02 riastradh Exp $
+# $NetBSD: Makefile,v 1.22 2024/07/07 17:37:33 riastradh Exp $
#
NOMAN= # defined
@@ -28,10 +28,22 @@ SUBDIR+= helper_use_static
TESTSDIR= ${TESTSBASE}/libexec/ld.elf_so
TESTS_C+= t_dlerror-cleared t_dlerror-false t_dlinfo t_dlvsym t_ifunc
+TESTS_C+= t_ifunc_now
+TESTS_C+= t_ifunc_norelro
+TESTS_C+= t_ifunc_norelro_now
TESTS_C+= t_rtld_r_debug
TESTS_C+= t_tls_extern
TESTS_C+= t_hash
+SRCS.t_ifunc_now= t_ifunc.c
+SRCS.t_ifunc_norelro= t_ifunc.c
+SRCS.t_ifunc_norelro_now= t_ifunc.c
+
+LDADD.t_ifunc+= -Wl,-z,relro
+LDADD.t_ifunc_now+= -Wl,-z,relro -Wl,-z,now
+LDADD.t_ifunc_norelro+= -Wl,-z,norelro
+LDADD.t_ifunc_norelro_now+= -Wl,-z,norelro -Wl,-z,now
+
.PATH: ${NETBSDSRCDIR}/libexec/ld.elf_so
SRCS.t_hash+= t_hash.c
SRCS.t_hash+= hash.c
@@ -41,8 +53,10 @@ COPTS.t_rtld_r_debug.c += ${CC_WNO_MAYBE
LDADD.t_dlerror-false= -Wl,-rpath,/var/nonexistent/lib
LDADD.t_dlvsym= -Wl,-rpath,${TESTSDIR}/h_helper_symver_dso2
-LDADD.t_ifunc= -Wl,-rpath,${TESTSDIR} -lutil
-DPADD.t_ifunc= ${LIBUTIL}
+.for t in t_ifunc t_ifunc_now t_ifunc_norelro t_ifunc_norelro_now
+LDADD.${t}+= -Wl,-rpath,${TESTSDIR} -lutil
+DPADD.${t}+= ${LIBUTIL}
+.endfor
LDADD.t_tls_extern+= -Wl,-rpath,${TESTSDIR}
TESTS_SH+= t_df_1_noopen t_dl_symver t_thread_local_dtor