This is an archive of the discontinued LLVM Phabricator instance.

Do not add .interp, .dynamic nor .eh_frame_hdr to segments just by type.
ClosedPublic

Authored by ruiu on Aug 18 2016, 7:00 PM.

Details

Summary

We previously added these output sections to segments just by type.
Therefore, if there's a PHDRS command like this

PHDRS {
  headers PT_PHDR PHDRS;
  interp PT_INTERP;
}

SECTIONS {
  . = SIZEOF_HEADERS;
  .interp : { *(.interp) } :text
}

then .interp was added to "interp" segment even though the linker
is not instructed to do so by SECTIONS command. This patch removes
the default behavior to simplify.

Diff Detail

Repository
rL LLVM

Event Timeline

ruiu updated this revision to Diff 68643.Aug 18 2016, 7:00 PM
ruiu retitled this revision from to Do not add .interp, .dynamic nor .eh_frame_hdr to segments just by type..
ruiu updated this object.
ruiu added a reviewer: evgeny777.
ruiu added a subscriber: llvm-commits.
evgeny777 accepted this revision.Aug 19 2016, 2:39 AM
evgeny777 edited edge metadata.

Makes sense. LGTM.

This revision is now accepted and ready to land.Aug 19 2016, 2:39 AM
This revision was automatically updated to reflect the committed changes.