This is an archive of the discontinued LLVM Phabricator instance.

[DEMO] - Demo prototype of "tree" view of linkerscript design.
AbandonedPublic

Authored by grimar on Jul 20 2016, 12:30 PM.

Details

Reviewers
grimar
Summary

This is demo of linker script tree representation.

Since SECTION can be:

SECTION {
assignment<>
outputsection<>
  assignment<>
  ...
  phds<>
assignment<>
outputsection<>
}

This classes hierarchy can keep something like that for parsing.

I took Phdrs command for example. Previously it was not section command, when it seems it should be.

Diff Detail

Event Timeline

grimar updated this revision to Diff 64728.Jul 20 2016, 12:30 PM
grimar retitled this revision from to [DEMO] - Demo prototype of "tree" view of linkerscript design..
grimar updated this object.
grimar added a reviewer: grimar.
grimar updated this object.
grimar updated this object.Jul 20 2016, 12:32 PM
grimar updated this object.Jul 20 2016, 12:37 PM
ruiu added a subscriber: ruiu.Jul 20 2016, 12:40 PM
ruiu added inline comments.
ELF/LinkerScript.h
47

Since you are trying to define a class to represent https://sourceware.org/binutils/docs/ld/Output-Section-Description.html#Output-Section-Description, you want to reflect the structure of the command. So I guess you want to define something like

struct OutputSectionDescription {
  std::vector<OutputSectionCommand> Commands;
  std::vector<StringRef> Phdrs;
  std::vector<uint8_t> Filler;
}
grimar added inline comments.Jul 20 2016, 12:47 PM
ELF/LinkerScript.h
47

I see. Thanks for clarification.
I`ll try to prepare the first real patch then. In a few hours I hope.

grimar abandoned this revision.Jul 20 2016, 11:51 PM