Bug ID 1226036
Summary Binutils 2.41 does not print symbol versions
Classification openSUSE
Product openSUSE Distribution
Version Leap 15.5
Hardware All
OS openSUSE Leap 15.5
Status NEW
Severity Major
Priority P5 - None
Component Development
Assignee screening-team-bugs@suse.de
Reporter me@harmenstoppels.nl
QA Contact qa-bugs@suse.de
Target Milestone ---
Found By ---
Blocker ---

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


You are receiving this mail because: