[PATCH] D33680: [ELF] - Resolve references properly when using .symver directive

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 03:13:14 PDT 2017


grimar added a comment.

In https://reviews.llvm.org/D33680#772682, @ruiu wrote:

> I don't think we want to add a new function `resolve` for this feature. That function seems a bit too ad-hoc. You probably should resolve any symbol whose name is "foo@@bar" as "foo" from the beginning, by stripping "@@" and any characters that follows double-atsign before inserting symbols to the symbol table.


I afraid I do not know how to implement your idea right now then. We add symbols at SymbolTable<ELFT>::insert(StringRef Name). There we are unable to assign symbol
versions, because we do not know if this symbol undefined or not shared may be (that means it is not a definition). At this place we have only name. And still need to parse it somehow
to assign proper version definition. This patch allows to do that in easy and clear way.

I spent not much time on this and may be missing something. Going to revisit your suggestion later.


https://reviews.llvm.org/D33680





More information about the llvm-commits mailing list