HomePhabricator

Make TLS work for PIE executables on x86-64.
Audit RequiredrL265462

Description

Make TLS work for PIE executables on x86-64.

While trying to get PIE work on CloudABI for x86-64, I noticed that even
though GNU ld would generate functional binaries, LLD would not. It
turns out that we generate relocations for referencing TLS objects
inside of the text segment, which shouldn't happen.

This change extends the isRelRelative() function to list some additional
relocation types that should be treated as relative. This makes my C
library unit testing binary work on x86-64.

Approved by: ruiu
Differential Revision: http://reviews.llvm.org/D18688
Fixes bug: https://llvm.org/bugs/show_bug.cgi?id=27174

Details

Auditors
Bigcheese
Committed
edApr 5 2016, 1:51 PM
Parents
rL265461: XFail TestImport.py on Windows because Python 3 import rules don't work that…
Branches
Unknown
Tags
Unknown