|
From: | Nick Clifton |
Subject: | Re: Assembler unable to handle relative offsets in PIC code under cross-compiling env. |
Date: | Thu, 09 Feb 2006 11:55:47 +0000 |
User-agent: | Mozilla Thunderbird 1.0.7-1.4.1 (X11/20050929) |
Hi Ayonam,
The assembly fragment in question looks like this: .section .rodata .L5465: .long .L5457-.+(.-.L5465) .long .L5458-.+(.-.L5465) <<<<<<- Problem first reported here
.section .gnu.linkonce.t._ZNK6Layout12StdTransformIiE9transformIdEEKNS_5PointIT_EERS6_.L5458:
The problem is that the two symbols (.L5458 and .L5465) are in different sections. Therefore it is impossible for the assembler to calculate the distance between them. Since the symbols are local symbols they are not emitted into the object file and so they are not available for the linker to calculate the distance either.
The real root of the problem I believe is that you are using a broken compiler. You say that you are using GCC 2.3.2 which is an extremely old version. I would strongly urge you to upgrade to the 2.95 release, or better yet the 3.4.4 release or even the 4.1 release.
If you cannot do this then see if the version of gcc you are using has any switches to alter the way it handles case statements. eg -fno-jump-tables.
Cheers Nick
[Prev in Thread] | Current Thread | [Next in Thread] |