This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: absolute relocation in TextSegment failed when loading a shared lib on arm7


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]