This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: absolute relocation in TextSegment failed when loading a shared lib on arm7
- From: Daniel Jacobowitz <drow at false dot org>
- To: chris schlund <chrisschlund at gmx dot de>
- Cc: libc-ports at sources dot redhat dot com
- Date: Thu, 16 Feb 2006 08:38:12 -0500
- Subject: Re: absolute relocation in TextSegment failed when loading a shared lib on arm7
- References: <43F463FF.8090206@gmx.de>
On Thu, Feb 16, 2006 at 12:37:35PM +0100, chris schlund wrote:
> Hi,
>
> I think there is a problem with the handling of absolute relocations in
> text segment of shared libraries in glibc when using arm7 controller.
>
> In our example there should be an absolute relocation on label "rel".
> The relocation table for the library seems to be ok:
>
> RELOCATION RECORDS FOR [.text]:
> OFFSET TYPE VALUE
> 00000008 R_ARM_PC24 .text
> 00000010 R_ARM_ABS32 a_function
Don't do that then! I don't know how you managed to generate this, but
(A) you should use PIC code to build shared libraries, which will
prevent R_ARM_ABS32, and (B) the linker should not output R_ARM_PC24
for shared libraries.
> As far as I can see the format of the shared library is ok (see below
> for more info). thats why i think this is a glibc problem.
No, your shared library is broken; you are missing a DT_TEXTREL tag in
the dynamic section. Upgrade binutils to fix this.
--
Daniel Jacobowitz
CodeSourcery