This test checks code layout by function symbol ordering, but that
doesn't work on powerpc64 ELFv1 where the function symbol is on a
descriptor. A simple work-around is to have nm emit synthetic symbols
marking the code entry point of functions. Since the text segment is
laid out before the data segment, the synthetic symbols will have
lower addresses than function descriptor symbols and be seen first in
nm -n output.
On other targets, nm --synthetic typically emits symbols on plt
entries. Since the testcase doesn't call any of the functions of
interest there shouldn't be plt entries for those functions, so there
should be no potentially confusing extra symbols.
* testsuite/Makefile.am (keep_text_section_prefix_nm.stdout):
Pass --synthetic to nm.
* testsuite/Makefile.in: Regenerate.
+2018-12-18 Alan Modra <amodra@gmail.com>
+
+ * testsuite/Makefile.am (keep_text_section_prefix_nm.stdout):
+ Pass --synthetic to nm.
+ * testsuite/Makefile.in: Regenerate.
+
2018-12-08 Alan Modra <amodra@gmail.com>
PR 21128
keep_text_section_prefix_readelf.stdout: keep_text_section_prefix
$(TEST_READELF) -Wl $< >$@
keep_text_section_prefix_nm.stdout: keep_text_section_prefix
- $(TEST_NM) -n $< >$@
+ $(TEST_NM) -n --synthetic $< >$@
check_PROGRAMS += icf_virtual_function_folding_test
MOSTLYCLEANFILES += icf_virtual_function_folding_test icf_virtual_function_folding_test.map
@GCC_TRUE@@NATIVE_LINKER_TRUE@keep_text_section_prefix_readelf.stdout: keep_text_section_prefix
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -Wl $< >$@
@GCC_TRUE@@NATIVE_LINKER_TRUE@keep_text_section_prefix_nm.stdout: keep_text_section_prefix
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_NM) -n $< >$@
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_NM) -n --synthetic $< >$@
@GCC_TRUE@@NATIVE_LINKER_TRUE@icf_virtual_function_folding_test.o: icf_virtual_function_folding_test.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIE -g -o $@ $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@icf_virtual_function_folding_test: icf_virtual_function_folding_test.o gcctestdir/ld