[llvm-dev] [PPC] Linker fails on -fstack-protector

Joerg Sonnenberger via llvm-dev
Mon, 22 Feb 2016 23:32:46 -0000

On Mon, Jan 25, 2016 at 07:57:43PM +0000, Tim Shen via llvm-dev
wrote:
> A cleaner solution could be adding an IR intrinsic llvm.get_tcb_address()
> and hard code the offset of stack_guard member, since they aren't
supposed
> to change.

It would also be inefficient on architectures that can directly access
TLS variables. I.e. on x86, it is effectively a statically allocated TLS
variable with fixed offset. That can be accessed by a single load --
whereas introducing get_tcb_address first would require a second load.

Joerg