-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PIC codegen for Linux/X86 #1439
Comments
assigned to @asl |
This would be a great thing to have. PIC shouldn't be encoded in target data, |
Yep. I've just didn't look into darwin code before writing this report (as for Probably, I'll have some time to implement this in the mid/end Jan. |
Mine. This is not enhancement, but missing feature. Note, that 1006 also depends |
makes sense to me! |
I've sent patches to: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070101/042114.html These patches was tested on applications from llvm-test and worked fine. Also, Probably, patches should be commited after review. After, remaining linker |
All linker issues have gone after http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070101/042142.html Qt is happy now. Probably, the same patch should be applied to PPC Codegen as well. |
Just found some incorrect PIC codegen. Will investigate. Patches should be fixed. |
The problem was investigated. The library in question was recent Qt 4.2.2. I've built it as shared library. Problem: binary crashed in the early intiailization (e.g. running static ctors However, gcc-compiled "qdbuscpp2xml" binary runs ok (with llvm-compiled Qt
As everything is ok with static linking I've started with dynamic linker It seems, that I've found the actual problem (part of logs):
Note, in the second case shared library external was linked to non-PIC version As it seems to me, that we really should support different visibility levels. |
Maybe, I was wrong speaking about problem source in visibility levels. Actually, |
Shouldn't this bug be closed? We already have one for aliases support (#1006 ). |
Well, actually I have Qt crashed here (as I've described). Probably, this is due |
There was bug, which prevented Qt from running... Fixed with these patches: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070115/042840.html Now Qt runs fine being built in "shared" mode. The next big step is Mozilla.... :) |
nice!! |
mentioned in issue llvm/llvm-bugzilla-archive#1085 |
Extended Description
We really should support PIC codegen for Linux. Probably, we need to add
additional entry to TargetData to distinguish pic & non-pic codegen (propagating
-fPIC flag from llvm-gcc).
It seems, that X86/Darwin codegen is already PIC (everything there is PIC), so,
this code should be inspected. Also, ELF-specific codegen (GOT, PLT) should be
introduced.
This will allow us to build rather complex applications, e.g. mozilla/seamonkey.
The text was updated successfully, but these errors were encountered: