[all-commits] [llvm/llvm-project] ee9a25: [ELF] Set DF_1_PIE for -pie
Fangrui Song via All-commits
all-commits at lists.llvm.org
Mon Jun 1 10:20:02 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: ee9a251caf1d785798c3602d473c3d2d84180d50
https://github.com/llvm/llvm-project/commit/ee9a251caf1d785798c3602d473c3d2d84180d50
Author: Fangrui Song <maskray at google.com>
Date: 2020-06-01 (Mon, 01 Jun 2020)
Changed paths:
M lld/ELF/SyntheticSections.cpp
M lld/test/ELF/aarch64-feature-bti.s
M lld/test/ELF/aarch64-gnu-ifunc-nonpreemptable.s
M lld/test/ELF/aarch64-ifunc-bti.s
M lld/test/ELF/arm-pie-relative.s
M lld/test/ELF/gnu-ifunc-dyntags.s
M lld/test/ELF/i386-retpoline-pic.s
M lld/test/ELF/local-got-pie.s
M lld/test/ELF/pack-dyn-relocs-arm2.s
M lld/test/ELF/pack-dyn-relocs-relr-loop.s
M lld/test/ELF/pack-dyn-relocs.s
M lld/test/ELF/pie.s
M lld/test/ELF/ppc32-call-stub-pic.s
M lld/test/ELF/ppc32-ifunc-nonpreemptible-pic.s
M lld/test/ELF/ppc64-long-branch-pi.s
M lld/test/ELF/relative-dynamic-reloc-pie.s
M lld/test/ELF/riscv-gp.s
M lld/test/ELF/riscv-ifunc-nonpreemptible.s
M lld/test/ELF/separate-segments.s
Log Message:
-----------
[ELF] Set DF_1_PIE for -pie
DF_1_PIE originated from Solaris (https://docs.oracle.com/cd/E36784_01/html/E36857/chapter6-42444.html ).
GNU ld since
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5fe2850dd96483f176858fd75c098313d5b20bc2
sets the flag on non-Solaris platforms.
It can help distinguish PIE from ET_DYN.
eu-classify from elfutils uses this to recognize PIE (https://sourceware.org/git/?p=elfutils.git;a=commit;h=3f489b5c7c78df6d52f8982f79c36e9a220e8951 )
glibc uses this flag to reject dlopen'ing a PIE (https://sourceware.org/bugzilla/show_bug.cgi?id=24323 )
Reviewed By: psmith
Differential Revision: https://reviews.llvm.org/D80872
More information about the All-commits
mailing list