This is an archive of the discontinued LLVM Phabricator instance.

Make Linkerscript accessible from LinkingContext
AbandonedPublic

Authored by davide on Jan 25 2015, 9:05 PM.

Details

Reviewers
rafaelauler
ruiu
Summary

Put a pointer to linker script AST into the LinkingContext, so everyone can access linker script information.
This is the first step needed to implement semantic actions for Linker Script constructs.

Diff Detail

Event Timeline

davide updated this revision to Diff 18737.Jan 25 2015, 9:05 PM
davide retitled this revision from to Make Linkerscript accessible from LinkingContext.
davide updated this object.
davide edited the test plan for this revision. (Show Details)
davide added reviewers: rafaelauler, ruiu, rui314.
davide added a project: lld.
davide added a subscriber: Unknown Object (MLST).
emaste added a subscriber: emaste.Jan 26 2015, 6:19 AM
ruiu edited edge metadata.Jan 26 2015, 10:51 AM

I'd avoid carrying around raw linker script information as much as possible because it's too low level. An AST of a linker script is raw information about the linker script, and this patch will make it visible to virtually everyone (because the linking context object is shared by all components). It feels to me that this patch makes the information to be shared too broadly.

I made a change to interpret a linker script in the driver. I'd interpret linker scripts only in the driver and set cooked information to the linking context, instead of raw data. Is there any reason you can't do that way?

ruiu removed a reviewer: rui314.Jan 26 2015, 11:03 AM
davide abandoned this revision.Jan 26 2015, 11:33 PM

I can do that way, and I probably should. Close this.