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/libs
but not the other way round.
this also has an advantage. say you don't like the printf implementation
in libc. with the rules above, you can now supply your own printf in
library or object before libc and you can be sure that it takes your
implementation.
Also ... why does the example in the fact (apparently from msp430-gcc
-v) link in libgcc twice?
yes thats correct
if e.g. the libgcc itself contains dependencies on libc, which itself
depends on libgcc, then "-lgcc -lc -lgcc" is required
chris
-----Original Message-----
From: Christopher Piggott
Sent: Tuesday, December 06, 2005 8:08 PM
To: 'mspgcc-users@lists.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?