This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Define __ehdr_start symbol
ClosedPublic

Authored by phosek on Aug 20 2016, 10:53 PM.

Details

Summary

This symbol can be used by the program to examine its own headers.

Diff Detail

Event Timeline

phosek updated this revision to Diff 68798.EditedAug 20 2016, 10:53 PM
phosek retitled this revision from to [ELF] Define __ehdr_start symbol.
phosek updated this object.
phosek added a reviewer: ruiu.
phosek added a project: lld.
phosek added subscribers: llvm-commits, phosek.

This was added to GNU Binutils ld in this patch.

emaste added a subscriber: emaste.Aug 21 2016, 2:19 AM
ruiu accepted this revision.Aug 21 2016, 9:52 PM
ruiu edited edge metadata.

LGTM

This revision is now accepted and ready to land.Aug 21 2016, 9:52 PM
This revision was automatically updated to reflect the committed changes.
pcc added a subscriber: pcc.Feb 23 2017, 3:47 PM

Is this correct? It looks like the other linkers define __ehdr_start to the address of the ELF file header, rather than the program headers.

In D23750#685190, @pcc wrote:

Is this correct? It looks like the other linkers define __ehdr_start to the address of the ELF file header, rather than the program headers.

You're right, this is incorrect, I'll send a patch shortly.