This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Allow overriding reserved symbols in linker script
ClosedPublic

Authored by evgeny777 on Jul 13 2016, 3:25 AM.

Details

Reviewers
ruiu
Summary

This is a small bugfix for http://reviews.llvm.org/D22088

Resverved symbols are added in addReservedSymbols(), which is called before createSections()
Therefore if you define some reserved symbol in linker script then lld will report error because of name conflict

Diff Detail

Event Timeline

evgeny777 updated this revision to Diff 63790.Jul 13 2016, 3:25 AM
evgeny777 retitled this revision from to [ELF] Allow overriding reserved symbols in linker script.
evgeny777 updated this object.
evgeny777 added a reviewer: ruiu.
evgeny777 set the repository for this revision to rL LLVM.
evgeny777 added a project: lld.
evgeny777 updated this object.
evgeny777 added subscribers: grimar, ikudrin, llvm-commits.
ruiu added inline comments.Jul 13 2016, 12:35 PM
test/ELF/linkerscript-symbols.s
4–7 ↗(On Diff #63790)

Does this test check for the new code? I think you need two test cases, one is for symbol definition and the other is for symbol conflict.

evgeny777 updated this revision to Diff 63849.Jul 13 2016, 1:09 PM

Created separate test case. Review updated

ruiu accepted this revision.Jul 13 2016, 1:11 PM
ruiu edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jul 13 2016, 1:11 PM
evgeny777 closed this revision.Jul 15 2016, 9:29 AM