This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Define linkerscript symbols early.
ClosedPublic

Authored by grimar on Jan 12 2018, 5:02 AM.

Details

Summary

Currently symbols assigned or created by linkerscript are not processed early
enough. As a result it is not possible to version them or assign any other flags/properties.

Patch creates Defined symbols for -defsym and linkerscript symbols early,
so that issue from above can be addressed.

It is based on Rafael Espindola's version of D38239 patch.

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

grimar created this revision.Jan 12 2018, 5:02 AM
grimar updated this revision to Diff 131750.Jan 29 2018, 1:02 AM
grimar edited the summary of this revision. (Show Details)

rL323633 was landed and this one is unblocked now. Rebased.

Thank you!

I don't see a test case for actually being able to version a symbol (or symbol alias) defined in a linker script?

This should fix PR34121 (if you wanna note that in the summary).

This revision was not accepted when it landed; it landed in state Needs Review.Jan 30 2018, 1:06 AM
This revision was automatically updated to reflect the committed changes.

Thank you!

I don't see a test case for actually being able to version a symbol (or symbol alias) defined in a linker script?

This should fix PR34121 (if you wanna note that in the summary).

Thanks. Looks just forgot to add the test file to diff. It is ELF/linkerscript/version-script.s,
it is a testcase used in D36579 with additions done by Rafael.