Page MenuHomePhabricator

ELFObjectWriter: Allow one unique symver per symbol
ClosedPublic

Authored by vlad.tsyrklevich on Apr 19 2018, 3:51 PM.

Details

Summary

Only allow a single unique .symver alias per symbol. This matches the
behavior of gas. I noticed that we ignored multiple mismatched symver
directives looking at https://reviews.llvm.org/D45798

Diff Detail

Repository
rL LLVM

Event Timeline

pcc accepted this revision.Apr 26 2018, 11:48 AM

LGTM

lib/MC/ELFObjectWriter.cpp
423 ↗(On Diff #143179)

Nit: I think line 423-427 can be written with one insert:

if (Renames.insert(std::make_pair(&Symbol, Alias)).first->second != Alias) report_fatal_error(...);

Maybe a little too terse though.

This revision is now accepted and ready to land.Apr 26 2018, 11:48 AM
This revision was automatically updated to reflect the committed changes.