unresolved relocation??

Iain Worlock iworlock@jigsawtech.com
Tue Jun 15 03:48:00 GMT 2010

Hi Ian,

Thanks for the quick response.  I was having a bunch of little
problems, all of which were down to supplying the wrong cmd line
switches to the cc compiler driver utility (poor docs for my out of
date toolchain...).  I was pursuing this for a professional project
but it is no longer an approach valid for our purposes, so I won't be
working on it any longer.  Thanks for the swift response, though!


On Wed, Jun 9, 2010 at 7:34 AM, Ian Lance Taylor <iant@google.com> wrote:
> Iain Worlock <iworlock@jigsawtech.com> writes:
>> The flag '-std=c99' was not recognised, but as gcc 2.91.66 is pre 1999
>> I didn't find that surprising & removed this.  The real problem I have
>> is that a few files in to the compile, I get an 'Error: unresolved
>> relocation' in a temporary asm file (/tmp/XYZ.s).  If I remove the
>> -fPIC flag (position independent code), compilation goes a little
>> further but fails on link.  As I am trying to build a library, I'm
>> assuming that I actually do want to specify -fPIC, but have no idea
>> what the unresolved relocation is referring to, or how to resolve it.
> Show us a small test case, with the generated assembly code.  I don't
> know what that error message means.
> It is quite likely that it is simply a bug in the ancient toolchain
> you are using.
> Ian

More information about the Gcc-help mailing list