Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » MSPGCC
  • » [Mspgcc-users] RE: Multiplier errors when invoking ld directly [RSS Feed]

#1 Dec. 7, 2005 02:18:24

Christopher E.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] RE: Multiplier errors when invoking ld directly


I figured it out. I have to specify the libraries AFTER my objects.
Why does the order matter?

Also ... why does the example in the fact (apparently from msp430-gcc
-v) link in libgcc twice?



-----Original Message-----
From: Christopher Piggott
Sent: Tuesday, December 06, 2005 8:08 PM
To: 'mspgcc-us***@*ists.sourceforge.net'
Subject: Multiplier errors when invoking ld directly


The FAQ says:

>>I am getting link errors about missing multiply routines. What is
wrong?
>The usual cause for this problem is that you specified a different
"-mmcu=" option at the compile and link stages.

For invoking ld directly, the above probably means "-m emulation".

I pass this to ld:
-m msp430x149
-nostdlib
-L/mspgcc/msp430/lib
-L/mspgcc/lib/gcc-lib/msp430/3.2.3
-lc -lm -lgcc

I think those are the only libraries I should need, but those symbosl
are indeed not there. I did objdumps on every library in the toolsuite
and didn't find ANY of the symbols it is looking for ... __udivmodsi4
__umulsi3hw etc.

If I am linking explicitly with LD, where do I find these objects?

Offline

#2 Dec. 7, 2005 23:53:10

Chris L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[Mspgcc-users] RE: Multiplier errors when invoking ld directly


Christopher E Piggott schrieb:I figured it out. I have to specify the libraries AFTER my objects.
Why does the order matter?think of it as a single pass linking.later ojects/libraries can supply symbols used by previous objects/libsbut not the other way round.this also has an advantage. say you don't like the printf implementationin libc. with the rules above, you can now supply your own printf inlibrary or object before libc and you can be sure that it takes yourimplementation.Also ... why does the example in the fact (apparently from msp430-gcc
-v) link in libgcc twice?yes thats correctif e.g. the libgcc itself contains dependencies on libc, which itselfdepends on libgcc, then "-lgcc -lc -lgcc" is requiredchris-----Original Message-----From: Christopher PiggottSent: Tuesday, December 06, 2005 8:08 PMTo: 'mspgcc-us***@*ists.sourceforge.net'
Subject: Multiplier errors when invoking ld directly


The FAQ says:I am getting link errors about missing multiply routines. What iswrong?The usual cause for this problem is that you specified a different"-mmcu=" option at the compile and link stages.

For invoking ld directly, the above probably means "-m emulation".

I pass this to ld:
-m msp430x149
-nostdlib
-L/mspgcc/msp430/lib
-L/mspgcc/lib/gcc-lib/msp430/3.2.3
-lc -lm -lgcc

I think those are the only libraries I should need, but those symbosl
are indeed not there. I did objdumps on every library in the toolsuite
and didn't find ANY of the symbols it is looking for ... __udivmodsi4
__umulsi3hw etc.

If I am linking explicitly with LD, where do I find these objects?

Offline

  • Root
  • » MSPGCC
  • » [Mspgcc-users] RE: Multiplier errors when invoking ld directly [RSS Feed]

Board footer

Moderator control

Enjoy the 20th of January
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support