Page MenuHomePhabricator

[ELF] Linkerscript: allow .eh_frame_hdr to go before .eh_frame
ClosedPublic

Authored by evgeny777 on Aug 30 2016, 10:06 AM.

Details

Summary

Currently .eh_frame_hdr must be written after .eh_frame, because EhFrameHeader is filled in EhOutputSection::writeTo(). This patch fixes it in a cost of one extra disk seek.

Diff Detail

Repository
rL LLVM

Event Timeline

evgeny777 updated this revision to Diff 69718.Aug 30 2016, 10:06 AM
evgeny777 retitled this revision from to [ELF] Linkerscript: allow .eh_frame_hdr to go before .eh_frame.
evgeny777 updated this object.
evgeny777 added reviewers: ruiu, rafael.
evgeny777 set the repository for this revision to rL LLVM.
evgeny777 added a project: lld.
evgeny777 added subscribers: grimar, ikudrin, llvm-commits.
ruiu accepted this revision.Aug 30 2016, 12:42 PM
ruiu edited edge metadata.

LGTM

ELF/Writer.cpp
1312 ↗(On Diff #69718)

Add a comment saying that EhFrameHdr depends on EhFrame contents therefore it needs to be written after EhFrame is writtern.

This revision is now accepted and ready to land.Aug 30 2016, 12:42 PM
This revision was automatically updated to reflect the committed changes.