[all-commits] [llvm/llvm-project] fac114: [ELF] -r: don't create .interp
Fangrui Song via All-commits
all-commits at lists.llvm.org
Thu Jan 16 13:26:03 PST 2020
Branch: refs/heads/release/10.x
Home: https://github.com/llvm/llvm-project
Commit: fac11406197ed993f1965ed1edc0369a12a2f8e2
https://github.com/llvm/llvm-project/commit/fac11406197ed993f1965ed1edc0369a12a2f8e2
Author: Fangrui Song <maskray at google.com>
Date: 2020-01-16 (Thu, 16 Jan 2020)
Changed paths:
M lld/ELF/Writer.cpp
M lld/test/ELF/dynamic-linker.s
Log Message:
-----------
[ELF] -r: don't create .interp
`{clang,gcc} -nostdlib -r a.c` passes --dynamic-linker to the linker,
and the expected behavior is to ignore it.
If .interp is kept in the relocatable object file, a final link will get
PT_INTERP even if --dynamic-linker is not specified. glibc ld.so expects
to see PT_DYNAMIC and the executable will likely fail to run.
Ignore --dynamic-linker in -r mode as well as -shared.
(cherry picked from commit 2d7a8cf90478cd845ffb39763b0e95b7715322d2)
More information about the All-commits
mailing list