+2018-11-26 Alan Modra <amodra@gmail.com>
+
+ * testsuite/Makefile.am (justsyms_lib): Link with -z norelro.
+ * testsuite/Makefile.in: Regenerate.
+ * testsuite/justsyms_exec.c (main): Do check exported_func
+ on PowerPC64 ELFv2.
+
2018-11-26 Alan Modra <amodra@gmail.com>
* testsuite/ver_test_14.sh: Accept objdump -T display of st_other
justsyms_lib.o: justsyms_lib.c
$(COMPILE) -c -o $@ $<
justsyms_lib: justsyms_lib.o gcctestdir/ld
- gcctestdir/ld -o $@ -Ttext=0x1000200 -Tdata=0x2000000 -e exported_func justsyms_lib.o
+ gcctestdir/ld -o $@ -z norelro -Ttext=0x1000200 -Tdata=0x2000000 -e exported_func justsyms_lib.o
check_PROGRAMS += binary_test
MOSTLYCLEANFILES += binary.txt
@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 $@ -Ttext=0x1000200 -Tdata=0x2000000 -e exported_func justsyms_lib.o
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld -o $@ -z norelro -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
int
main(void)
{
-#ifndef __powerpc64__
- /* PowerPC64 uses function descriptors. */
+#if !defined (__powerpc64__) || (defined (_CALL_ELF) && _CALL_ELF == 2)
+ /* PowerPC64 ELFv1 uses function descriptors. */
check(exported_func, 0x1000200, "exported_func");
#endif
check(&exported_data, 0x2000000, "exported_data");