Closed Quuxplusone closed 5 years ago
Bugzilla Link | PR39419 |
Status | RESOLVED INVALID |
Importance | P normal |
Reported by | Xunlei Wu (Xunlei.wu@sas.com) |
Reported on | 2018-10-24 07:10:30 -0700 |
Last modified on | 2018-10-24 15:05:53 -0700 |
Version | 7.0 |
Hardware | PC Linux |
CC | llvm-bugs@lists.llvm.org, t.p.northover@gmail.com |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
Was able to solve the issue by adding -relocation-model=pic to step 6 in the tutorial. The new version becomes
% llc -relocation-model=pic hello.bc -o hello.s
Please verify the fix is correct and update the document accordingly.
Yep, looks right to me. If you're linking a PIE executable (which your GCC seems to default to and is reasonably sensible) then all your object files need to be PIC. The way you do that on llc is via -relocation-model=pic.