This is an archive of the discontinued LLVM Phabricator instance.

[ELF/AArch64] Allow only valid dynamic relocations in the output.
ClosedPublic

Authored by ikudrin on Dec 3 2015, 8:19 AM.

Details

Summary

All relocations, which cannot be handled by the dynamic linker,
cause a linking error "rebuild with -fPIC".

The implementation differs from both ld and gold, which silently
generate a result file without any errors. However, in the result DSO
all normally preemptible symbols behave like locals.

Diff Detail

Event Timeline

ikudrin updated this revision to Diff 41757.Dec 3 2015, 8:19 AM
ikudrin retitled this revision from to [ELF/AArch64] Allow only valid dynamic relocations in the output..
ikudrin updated this object.
ikudrin added reviewers: ruiu, davide, rafael.
ikudrin added a project: lld.
ikudrin added a subscriber: llvm-commits.
ruiu accepted this revision.Dec 4 2015, 12:08 PM
ruiu edited edge metadata.

LGTM with a nit.

lld/trunk/ELF/Target.cpp
886

Please format this line using clang-format.

This revision is now accepted and ready to land.Dec 4 2015, 12:08 PM
ikudrin added inline comments.Dec 4 2015, 6:20 PM
lld/trunk/ELF/Target.cpp
886

It is clang-formatted. Please note, there is no '+' sign between strings. Would you like me to add it and reformat then?

ruiu added a comment.Dec 4 2015, 6:22 PM

LGTM

lld/trunk/ELF/Target.cpp
886

If it is formatted by clang-format, I'm fine with that.

This revision was automatically updated to reflect the committed changes.