This is an archive of the discontinued LLVM Phabricator instance.

[Object] Add DF_1_PIE
ClosedPublic

Authored by MaskRay on May 30 2020, 10:42 AM.

Details

Summary

This flag (and the whole field DT_FLAGS_1) originated from Solaris. I intend to use it in an LLD patch D80872.

Diff Detail

Event Timeline

MaskRay created this revision.May 30 2020, 10:42 AM
MaskRay edited the summary of this revision. (Show Details)May 30 2020, 10:43 AM
jhenderson accepted this revision.Jun 1 2020, 1:50 AM

LGTM.

llvm/include/llvm/BinaryFormat/ELF.h
1299–1300

There's an obvious gap here: what is 0x04000000? Should we support that too?

This revision is now accepted and ready to land.Jun 1 2020, 1:50 AM
MaskRay marked an inline comment as done.Jun 1 2020, 8:44 AM
MaskRay added inline comments.
llvm/include/llvm/BinaryFormat/ELF.h
1299–1300

0x04000000 is DF_1_STUB, stub object https://docs.oracle.com/cd/E36784_01/html/E36857/chapter2-22.html#scrolltoc

binutils does not use it. I leave it out because it is not clear it is useful. (Bazel has an interface shared object which may use the flag.)

This revision was automatically updated to reflect the committed changes.