* Merging of GNU_UNIQUE symbols with different versions
@ 2020-11-19 1:47 Valentin Churavy
2020-12-26 11:45 ` Florian Weimer
0 siblings, 1 reply; 2+ messages in thread
From: Valentin Churavy @ 2020-11-19 1:47 UTC (permalink / raw)
To: libc-help
Hi there,
I was looking at the handling of `GNU_UNIQUE` symbols in the presence of
version tags on those symbols.
I have two shared libraries that both version their symbols
nm --with-symbol-versions -D libLLVM-11.0.0jl.so | llvm-cxxfilt | grep
"llvm::RegisterRegAlloc"
0000000007f71780 u
llvm::RegisterRegAllocBase<llvm::RegisterRegAlloc>::Registry@@JL_LLVM_11.0@
@JL_LLVM_11.0
nm --with-symbol-versions -D libLLVM-11.0.0.so | llvm-cxxfilt | grep
"llvm::RegisterRegAlloc"
00000000052188e0 u
llvm::RegisterRegAllocBase<llvm::RegisterRegAlloc>::Registry@@LLVM_11@
@LLVM_11
and I am seeing behaviour that indicates that these two symbols are mapped
onto each other.
I discussed that more in the LLVM bug report
https://bugs.llvm.org/show_bug.cgi?id=48221
Looking at the glibc source code in particular `elf/dl-lookup.c` line 234
on 807f3ea9b
https://sourceware.org/git/?p=glibc.git;a=blob;f=elf/dl-lookup.c;h=807f3ea9b67489b3116535b7c433c774a72e4c29;hb=refs/heads/master#l234
It seems to me that the symbols are looked up by name and the code is not
checking for the symbol to be equivalent. Is my understanding correct?
If so is that the intended behaviour?
Thanks,
Valentin
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Merging of GNU_UNIQUE symbols with different versions
2020-11-19 1:47 Merging of GNU_UNIQUE symbols with different versions Valentin Churavy
@ 2020-12-26 11:45 ` Florian Weimer
0 siblings, 0 replies; 2+ messages in thread
From: Florian Weimer @ 2020-12-26 11:45 UTC (permalink / raw)
To: Valentin Churavy; +Cc: libc-help
* Valentin Churavy:
> Looking at the glibc source code in particular `elf/dl-lookup.c` line 234
> on 807f3ea9b
> https://sourceware.org/git/?p=glibc.git;a=blob;f=elf/dl-lookup.c;h=807f3ea9b67489b3116535b7c433c774a72e4c29;hb=refs/heads/master#l234
>
> It seems to me that the symbols are looked up by name and the code is not
> checking for the symbol to be equivalent. Is my understanding correct?
> If so is that the intended behaviour?
It looks like a bug to me. Would you please fil a report on
<https://sourceware.org/bugzilla/>? Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-26 11:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19 1:47 Merging of GNU_UNIQUE symbols with different versions Valentin Churavy
2020-12-26 11:45 ` Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).