[GOLD] Tweak keep_text_section_prefix test for PowerPC64 ELFv1
authorAlan Modra <amodra@gmail.com>
Tue, 18 Dec 2018 00:17:44 +0000 (10:47 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 18 Dec 2018 01:27:45 +0000 (11:57 +1030)
commita529dcc854968b7f6ad766c714650011dc361382
treee10bd95a2d42b2ab1edcda1f50cf7b5a868546de
parent7af5d5c4dda26ac36ee2ff42af8f39a10382cc41
[GOLD] Tweak keep_text_section_prefix test for PowerPC64 ELFv1

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.
gold/ChangeLog
gold/testsuite/Makefile.am
gold/testsuite/Makefile.in