2020-08-11 16:14:33 +02:00
|
|
|
Some packages of ours rely on the output of nm to not contain
|
|
|
|
symversions. E.g. perf uses 'nm -D' to construct a linker input
|
|
|
|
file with symbol names. ld errors on the '@' characters. Until
|
|
|
|
those packages are fixed we use this patch. We have to carry it
|
|
|
|
for old code streams forever.
|
|
|
|
|
2021-07-22 17:42:08 +02:00
|
|
|
diff --git a/binutils/nm.c b/binutils/nm.c
|
|
|
|
index 2637756c647..253714ef179 100644
|
|
|
|
--- a/binutils/nm.c
|
|
|
|
+++ b/binutils/nm.c
|
|
|
|
@@ -458,7 +458,7 @@ print_symname (const char *form, struct extended_symbol_info *info,
|
2021-01-28 14:33:36 +01:00
|
|
|
name = alloc;
|
2020-08-11 16:14:33 +02:00
|
|
|
}
|
|
|
|
|
2021-07-22 17:42:08 +02:00
|
|
|
- if (info != NULL && info->elfinfo && with_symbol_versions)
|
|
|
|
+ if (info != NULL && info->elfinfo && with_symbol_versions && 0)
|
2020-08-11 16:14:33 +02:00
|
|
|
{
|
|
|
|
const char *version_string;
|
2021-07-22 17:42:08 +02:00
|
|
|
bool hidden;
|
|
|
|
diff --git a/ld/testsuite/ld-elf/pr25708.d b/ld/testsuite/ld-elf/pr25708.d
|
|
|
|
index 60b8e31807a..1b62e25347e 100644
|
|
|
|
--- a/ld/testsuite/ld-elf/pr25708.d
|
|
|
|
+++ b/ld/testsuite/ld-elf/pr25708.d
|
2020-08-11 16:14:33 +02:00
|
|
|
@@ -2,8 +2,9 @@
|
|
|
|
#ld: -shared -version-script pr13195.t
|
2021-07-22 17:42:08 +02:00
|
|
|
#nm: -D --with-symbol-versions
|
2020-08-11 16:14:33 +02:00
|
|
|
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
|
|
|
|
-#xfail: hppa64-*-* ![check_shared_lib_support]
|
2021-07-22 17:42:08 +02:00
|
|
|
+#xfail: *-*-* ![check_shared_lib_support]
|
2020-08-11 16:14:33 +02:00
|
|
|
# h8300 doesn't support -shared, and hppa64 creates .foo
|
|
|
|
+# our binutils revert the printing of symversions with nm -D
|
|
|
|
|
|
|
|
#..
|
|
|
|
0+ A VERS_2.0
|