binutils-gdb/ld/testsuite/ld-elf/pr27128c.d
Alan Modra 6a1224ec76 PR27128, nm -P portable output format regression
Add nm --without-symbol-versions.

binutils/
	PR 27128
	* doc/binutils.texi: Add nm --with-symbol-versions and
	--without-symbol-versions documentation.
	* nm.c (with_symbol_versions): New variable.
	(enum long_option_values): Delete OPTION_WITH_SYMBOL_VERSIONS.
	(long_options): Make --with-symbol-versions entry twiddle the flag.
	Add --without-symbol-versions.
	(print_symname): Strip version when !with_symbol_versions.  Add
	dynamic version info under control of with_symbol_versions.
	(main): Remove OPTION_WITH_SYMBOL_VERSIONS case.
ld/
	* testsuite/ld-elf/pr25708.d: Add --with-symbol-versions to nm.
	* testsuite/ld-elf/pr27128a.d: Likewise.
	* testsuite/ld-elf/pr27128b.d: Likewise.
	* testsuite/ld-elf/pr27128c.d: Likewise.
	* testsuite/ld-elf/pr27128d.d: Likewise.
	* testsuite/ld-elf/pr27128e.d: Likewise.
2021-03-01 14:26:39 +10:30

17 lines
524 B
Makefile

#source: pr27128.s
#ld: -shared -version-script pr27128.t
#nm: -n --format=sysv --with-symbol-versions
#target: [check_shared_lib_support]
#notarget: [is_underscore_target]
# _Zrm1XS_ doesn't have an extra underscore.
#xfail: hppa64-*-* tic6x-*-*
# hppa64 uses dot-symbols, tic6x DYN lacks dynamic sections for this testcase
#...
VERS_2\.0 +\|0+\| +A +\| +OBJECT\| +\| +\|\*ABS\*
#...
foo@@VERS_2\.0 +\|[0-9a-f]+\| +T +\| +FUNC\|0+10\| +\|\.text
#...
_Zrm1XS_@@VERS_2\.0 +\|[0-9a-f]+\| +T +\| +FUNC\|0+10\| +\|\.text
#pass