[PATCH] D80871: [Object] Add DF_1_PIE

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 1 09:06:34 PDT 2020


MaskRay marked an inline comment as done.
MaskRay added inline comments.


================
Comment at: llvm/include/llvm/BinaryFormat/ELF.h:1299
   DF_1_GLOBAUDIT = 0x01000000,  // Global auditing required.
-  DF_1_SINGLETON = 0x02000000   // Singleton symbols are used.
+  DF_1_SINGLETON = 0x02000000,  // Singleton symbols are used.
+  DF_1_PIE = 0x08000000,        // Object is a position-independent executable.
----------------
jhenderson wrote:
> There's an obvious gap here: what is `0x04000000`? Should we support that too?
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.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80871/new/

https://reviews.llvm.org/D80871





More information about the llvm-commits mailing list