Re: more non-PIC static libs in shared libs
- To: firstname.lastname@example.org
- Subject: Re: more non-PIC static libs in shared libs
- From: Daniel Kobras <email@example.com>
- Date: Sun, 2 Feb 2003 00:44:35 +0100
- Message-id: <[🔎] 20030201234433.GB5669@neljae>
- Mail-followup-to: firstname.lastname@example.org
- In-reply-to: <20030113150939.GA28008@nevyn.them.org>
- References: <20030110152543.GA4647@wonderland.linux.it> <20030110165246.GC1494@neljae> <20030110201226.GA28310@comedi.org> <20030110223139.GA10533@nevyn.them.org> <20030111162742.GA853@neljae> <20030111231814.GA28110@nevyn.them.org> <20030112135809.GB1651@neljae> <20030112195711.GA6555@nevyn.them.org> <20030112205328.GD1651@neljae> <20030113150939.GA28008@nevyn.them.org>
[Sorry, took me a while to get back to this issue.]
On Mon, Jan 13, 2003 at 10:09:39AM -0500, Daniel Jacobowitz wrote:
> The question is what relocations the assembly uses. Looking at the
> linker... if there are any relocations in .rel.dyn which apply to
> read-only sections, i.e. .text usually, then the library is
> inadequately PIC. Are you branching to externally visible functions
> from assembly without using the GOT? Take a look through .rel.dyn; see
> if you can find the problem relocations by their offsets, and post the
> affected assembly code.
The assembly does all kinds of weird stuff: jumping to .text symbols,
referencing .rodata symbols. But even when I discarded all references
to read-only symbols from the asm, the lib still was flagged as TEXTREL.
There are still lots of relocations to read-write symbols in .data and
.bss. They end up as R_386_32 relocations. Am I right in assuming that
I'd have to clean those up as well?