This is an archive of the discontinued LLVM Phabricator instance.

ELF: Export preempted symbols even if there is a dynamic list.
ClosedPublic

Authored by pcc on Oct 6 2017, 2:00 PM.

Details

Summary

Dynamic lists in an executable are additive, not restrictive, so we
must continue to export preempted symbols even with a dynamic list.

This fixes sanitizer interception of libc symbols (and should also fix
symbol preemption by users of sanitizers).

Diff Detail

Repository
rL LLVM

Event Timeline

pcc created this revision.Oct 6 2017, 2:00 PM
ruiu added inline comments.Oct 6 2017, 2:15 PM
lld/ELF/Driver.cpp
787–789 ↗(On Diff #118078)

So, was this just wrong?

pcc added inline comments.Oct 6 2017, 2:27 PM
lld/ELF/Driver.cpp
787–789 ↗(On Diff #118078)

I think so, yes. Dynamic lists in executables are additive, while version scripts in DSOs are restrictive, so there's no direct conversion between them.

ruiu accepted this revision.Oct 6 2017, 2:33 PM

LGTM

This revision is now accepted and ready to land.Oct 6 2017, 2:33 PM
This revision was automatically updated to reflect the committed changes.