This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: relocatable link problem


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


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