Bug 1226036 - Binutils 2.41 does not print symbol versions
Summary: Binutils 2.41 does not print symbol versions
Status: NEW
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Development (show other bugs)
Version: Leap 15.5
Hardware: All openSUSE Leap 15.5
: P5 - None : Major (vote)
Target Milestone: ---
Assignee: Michael Matz
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-06 09:34 UTC by Harmen Stoppels
Modified: 2024-07-01 15:23 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harmen Stoppels 2024-06-06 09:34:46 UTC
When I run this command on openSUSE Leap 15.5, I don't get any symbol versions printed:


```
$ sha256sum libLLVM-15jl.so
4d71b40aa2bb2aebed1f10ec1d238ee9af40f9690a897bf8dc44fd6fe1d913c7  libLLVM-15jl.so

$ docker run -it --rm -v $PWD:$PWD -w $PWD opensuse/leap:15@sha256:57f63ada4c9afb3279190003720605623ef5214d7c83658a1a56e7678d910d55

# zypper install binutils

# nm --version | head -n1
GNU nm (GNU Binutils; SUSE Linux Enterprise 15) 2.41.0.20230908-150100.7.46

# nm -D --with-symbol-versions libLLVM-15jl.so | grep _ZN4llvm3Any6TypeId
0000000006e48b72 u _ZN4llvm3Any6TypeIdINS_17PreservedAnalysesEE2IdE
0000000006e49f10 u _ZN4llvm3Any6TypeIdIPKN5polly4ScopEE2IdE
0000000004efa124 u _ZN4llvm3Any6TypeIdIPKNS_13LazyCallGraph3SCCEE2IdE
0000000004ea29c3 u _ZN4llvm3Any6TypeIdIPKNS_15MachineFunctionEE2IdE
0000000004eebf26 u _ZN4llvm3Any6TypeIdIPKNS_4LoopEE2IdE
0000000004e96925 u _ZN4llvm3Any6TypeIdIPKNS_6ModuleEE2IdE
0000000004e96924 u _ZN4llvm3Any6TypeIdIPKNS_8FunctionEE2IdE

$ sha256sum libLLVM-15jl.so 
4d71b40aa2bb2aebed1f10ec1d238ee9af40f9690a897bf8dc44fd6fe1d913c7  libLLVM-15jl.so
```

This looks like a bug in openSUSE's binutils, because the same command works fine on any other distro on the same binutils version:

```
$ cat /etc/os-release | head -n1
PRETTY_NAME="Ubuntu 23.10"

$ /usr/bin/nm --version
GNU nm (GNU Binutils for Ubuntu) 2.41

$ ls
libLLVM-15jl.so

$ nm -D --with-symbol-versions libLLVM-15jl.so | grep _ZN4llvm3Any6TypeId
0000000006e48b72 u _ZN4llvm3Any6TypeIdINS_17PreservedAnalysesEE2IdE@@JL_LLVM_15.0
0000000006e49f10 u _ZN4llvm3Any6TypeIdIPKN5polly4ScopEE2IdE@@JL_LLVM_15.0
0000000004efa124 u _ZN4llvm3Any6TypeIdIPKNS_13LazyCallGraph3SCCEE2IdE@@JL_LLVM_15.0
0000000004ea29c3 u _ZN4llvm3Any6TypeIdIPKNS_15MachineFunctionEE2IdE@@JL_LLVM_15.0
0000000004eebf26 u _ZN4llvm3Any6TypeIdIPKNS_4LoopEE2IdE@@JL_LLVM_15.0
0000000004e96925 u _ZN4llvm3Any6TypeIdIPKNS_6ModuleEE2IdE@@JL_LLVM_15.0
0000000004e96924 u _ZN4llvm3Any6TypeIdIPKNS_8FunctionEE2IdE@@JL_LLVM_15.0
```


The file can be obtained here: https://drive.google.com/file/d/1R4feG66XvJpmSRT2-PRTvR_UCvvAmRC1/view?usp=sharing