[PATCH] D14571: [ELF2] - Implemented PT_GNU_STACK support, -z execstack option.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 12:42:16 PST 2015


> Is the last one reliable sign that the linker can emit PT_GNU_STACK segment?
> If it is, that means compilers knew whether PT_GNU_STACK is supported or not
> for each platform, no?

It could be made reliable, but looking at it it seems it is not :-(
Clang produces it for netbsd for example.

I think the only compatible way is to implement the old logic of, if
not given an explicit option, only add the program header if all files
have the section.

But we should also change clang to pass the option to the linker when
targeting linux so that we can at least hope to have a simpler
solution in the future.

Cheers,
Rafael


More information about the llvm-commits mailing list