Incompatibility of PIC and non-PIC
Quoted 7 lines
Shared libraries work well, but we've got a bigger problem now. Our PIC and non-PIC code models are mutually incompatible in a big way (due to the use of %r19 And, it seems, while it's fine if non-PIC can't be used in shared libraries, it's not all right if PIC can't be linked statically.
...
For that matter how does 32-bit HP/UX solve this issue?
When the HP-UX linker is building an a.out, it converts any r19-relative references into dp-relative references by rewriting the instructions. It still creates a linkage table entry if necessary (i.e., it doesn't rewrite a DLT-indirect reference as a direct dp-relative reference), but the linkage table entries are accessed via the dp register instead of r19.
Quoted 8 lines · Cary Coutant
Quoted 7 lines
Shared libraries work well, but we've got a bigger problem now. Our PIC and non-PIC code models are mutually incompatible in a big way (due to the use of %r19 And, it seems, while it's fine if non-PIC can't be used in shared libraries, it's not all right if PIC can't be linked statically.
...
For that matter how does 32-bit HP/UX solve this issue?
Quoted 5 lines
When the HP-UX linker is building an a.out, it converts any r19-relative references into dp-relative references by rewriting the instructions. It still creates a linkage table entry if necessary (i.e., it doesn't rewrite a DLT-indirect reference as a direct dp-relative reference), but the linkage table entries are accessed via the dp register instead of r19.
That's not too bad a hack. I took a different approach and generate import stubs when PIC code is detected during a static link. David, is there some problem with this (or was this a very old email that Cary was replying to)?
Alan Modra
Signature · 1 line
Linuxcare. Support for the Revolution.
Quoted 4 lines · Alan Modra
That's not too bad a hack. I took a different approach and generate import stubs when PIC code is detected during a static link. David, is there some problem with this (or was this a very old email that Cary was replying to)?
Very old email, I think. I don't see a problem with the way we do it either, though. Half dozen of one, six of the other...
Signature · 2 lines
[email protected], http://www.linuxcare.com/ Linuxcare. Support for the revolution.