This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Versionscript: support mangled symbols with the same name.
ClosedPublic

Authored by grimar on Sep 8 2016, 3:41 AM.

Diff Detail

Event Timeline

grimar updated this revision to Diff 70676.Sep 8 2016, 3:41 AM
grimar retitled this revision from to [ELF] - Versionscript: support mangled symbols with the same name..
grimar updated this object.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: grimar, llvm-commits, emaste, evgeny777.
emaste added a comment.Sep 8 2016, 7:34 AM

Just a heads-up before this gets committed: when I tried applying this locally (from Phabricator "download raw diff") it produced complaints about differing line endings.

Testing with this patch now.

grimar updated this revision to Diff 70705.Sep 8 2016, 8:31 AM
  • CRLF->LF
grimar added a comment.Sep 8 2016, 8:31 AM

Just a heads-up before this gets committed: when I tried applying this locally (from Phabricator "download raw diff") it produced complaints about differing line endings.

That is how patch creation works for me using svn diff. Usually I convert endings manually to unix one before publishing patch to phab, but looks not this time. Reuploaded with fixed endings.

emaste added a comment.Sep 8 2016, 1:31 PM

My original issue (found while linking the FreeBSD base system w/ lld) is fixed with this patch.

ruiu added inline comments.Sep 8 2016, 1:36 PM
ELF/SymbolTable.h
104

It seems you want to use multimap instead of map + vector.

grimar added inline comments.Sep 9 2016, 9:58 AM
ELF/SymbolTable.h
104

Problably I am missing something, but my question is: for what ?
I see no difference here.

ruiu added inline comments.Sep 9 2016, 10:14 AM
ELF/SymbolTable.h
104

I meant std::multimap<X, Y> is a more natural choice than std::map<X, std::vector<Y>>.

grimar updated this revision to Diff 70960.Sep 11 2016, 12:08 AM
  • Addressed review comments.
grimar added inline comments.Sep 11 2016, 12:12 AM
ELF/SymbolTable.h
0–1

So I switched to multimap, but please look at the changes I had to do for that. I am not sure I like them. For example I can not return ArrayRef from findDemangled() anymore.
I would probably better go with initial version here.

ruiu accepted this revision.Sep 12 2016, 4:08 PM
ruiu edited edge metadata.

Yeah, it doesn't look as good as I hoped, so LGTM on the std::vector version.

This revision is now accepted and ready to land.Sep 12 2016, 4:08 PM
This revision was automatically updated to reflect the committed changes.