PR27128, nm -P portable output format regression
Fangrui Song
i@maskray.me
Thu Dec 31 18:02:57 GMT 2020
On 2020-12-31, Alan Modra via Binutils wrote:
>On Wed, Dec 30, 2020 at 06:10:34AM -0800, H.J. Lu wrote:
>> I think they are useful. Here is a patch to add tests.
>
>Fails on mips due to mips overriding .byte and then foo and _Zrm1XS_
>having the same address. Which is quite weird. This results in -n
>sort not ordering the symbols as expected. I'm modifying the tests to
>use .space 16 instead.
>
>Also, this
>> +VERS_2.0 +|0+| +A +| +|0+1|.*
>matches anything. I'm adding backslash escapes to match literal '|'
>and '.', plus correcting the sysv expected lines.
>
>Committed.
>
>binutils/
> PR 27128
> * nm.c (print_symname): Append version string to symbol name
> before printing the lot under control of "form". Append version
> to demangled names too.
>ld/
> PR 27128
> * testsuite/ld-elf/pr27128.s: New file.
> * testsuite/ld-elf/pr27128.t: Likewise.
> * 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.
Oh, I did not know "gas: Extend .symver directive" (`.symver ... , remove`) has been committed.
`remove` will pretty much be always preferred
(https://maskray.me/blog/2020-11-26-all-about-symbol-versioning#Assembler-behavior)
However, it can be confusing. Instead of adding an optional argument to .symver, what about adding a new directive?
Note that copying attributes (.symver) isn't traditional behavior: for .set foo, bar, the visibility/binding bits of foo and bar are separate.
The new directive can just do renaming.
More information about the Binutils
mailing list