This is an archive of the discontinued LLVM Phabricator instance.

[lld][ELF] Apply segments from linker scripts
ClosedPublic

Authored by denis-protivensky on Jul 3 2015, 2:48 AM.

Details

Summary

Put sections to segments according to linker scripts if available.
Rework the code of TargetLayout::assignSectionsToSegments so it operates on the given list of segments, which can be either read from linker scripts or constructed as before.
Handle NONE segments defined in linker scripts by putting corresponding sections to PT_NULL segment.
Consider flags set for segments through linker scripts.

NOTE: handling program header, as well as PHDRS and FILEHDR attributes of PHDRS command will be implemented separately.

Diff Detail

Repository
rL LLVM

Event Timeline

denis-protivensky retitled this revision from to [lld][ELF] Apply segments from linker scripts.
denis-protivensky updated this object.
denis-protivensky added a reviewer: Bigcheese.
denis-protivensky added a project: lld.
denis-protivensky added a subscriber: llvm-commits.
Bigcheese accepted this revision.Jul 22 2015, 4:59 PM
Bigcheese edited edge metadata.

lgtm

This revision is now accepted and ready to land.Jul 22 2015, 4:59 PM
This revision was automatically updated to reflect the committed changes.