This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: relocatable link problem
- From: Nick Clifton <nickc at redhat dot com>
- To: Yvan Castilloux <kayoux at hotmail dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 22 Jun 2006 16:05:44 +0100
- Subject: Re: relocatable link problem
- References: <BAY103-F130C7F314159075130F0FCDE820@phx.gbl>
Hi Yvan,
The problems, for now, comes with pre-linking our code. There are some
functions that are called in our code but defined in the user's code. I
then decided to declare these functions as extern, otherwise there's an
undefined error. Then I added the -r option in the linkage. The command
was as follows:
msp430-gcc -mmcu=${CPU} -r -olibdevice.a -Tldscript1612.x -L$(LIBDIR)
$(DEVICE_OBJS) -ldevice
I suspect that the problem here is that the "-r" switch is not being
interpreted by the msp430-gcc program as a switch for the linker. Try
using "-Wl,-r" instead.
Cheers
Nick