binutils/binutils-revert-nm-symversion.diff
Michael Matz fd2a841d44 Accepting request 953949 from home:marxin:branches:devel:gcc
- Update to binutils 2.38:
  * elfedit: Add --output-abiversion option to update ABIVERSION.
  * Add support for the LoongArch instruction set.
  * Tools which display symbols or strings (readelf, strings, nm, objdump)
    have a new command line option which controls how unicode characters are
    handled.  By default they are treated as normal for the tool.  Using
    --unicode=locale will display them according to the current locale.
    Using --unicode=hex will display them as hex byte values, whilst
    --unicode=escape will display them as escape sequences.  In addition
    using --unicode=highlight will display them as unicode escape sequences
    highlighted in red (if supported by the output device).
  * readelf -r dumps RELR relative relocations now.
  * Support for efi-app-aarch64, efi-rtdrv-aarch64 and efi-bsdrv-aarch64 has been
    added to objcopy in order to enable UEFI development using binutils.
  * ar: Add --thin for creating thin archives. -T is a deprecated alias without
    diagnostics. In many ar implementations -T has a different meaning, as
    specified by X/Open System Interface.
  * Add support for AArch64 system registers that were missing in previous
    releases.
  * Add support for the LoongArch instruction set.
  * Add a command-line option, -muse-unaligned-vector-move, for x86 target
    to encode aligned vector move as unaligned vector move.
  * Add support for Cortex-R52+ for Arm.
  * Add support for Cortex-A510, Cortex-A710, Cortex-X2 for AArch64.
  * Add support for Cortex-A710 for Arm.
  * Add support for Scalable Matrix Extension (SME) for AArch64.
  * The --multibyte-handling=[allow|warn|warn-sym-only] option tells the
    assembler what to when it encoutners multibyte characters in the input.  The
    default is to allow them.  Setting the option to "warn" will generate a
    warning message whenever any multibyte character is encountered.  Using the

There are no new CVEs fixed in the release.

OBS-URL: https://build.opensuse.org/request/show/953949
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/binutils?expand=0&rev=387
2022-02-14 15:11:29 +00:00

35 lines
1.3 KiB
Diff

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.
diff --git a/binutils/nm.c b/binutils/nm.c
index 2637756c647..253714ef179 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -666,7 +666,7 @@ print_symname (const char *form, struct extended_symbol_info *info,
name = convert_utf8 (name);
}
- if (info != NULL && info->elfinfo && with_symbol_versions)
+ if (info != NULL && info->elfinfo && with_symbol_versions && 0)
{
const char *version_string;
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
@@ -2,8 +2,9 @@
#ld: -shared -version-script pr13195.t
#nm: -D --with-symbol-versions
#target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi
-#xfail: hppa64-*-* ![check_shared_lib_support]
+#xfail: *-*-* ![check_shared_lib_support]
# h8300 doesn't support -shared, and hppa64 creates .foo
+# our binutils revert the printing of symversions with nm -D
#..
0+ A VERS_2.0