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: Troubles linking with ld


On Tue, Feb 07, 2006 at 06:00:49PM -0500, securehell@hushmail.com wrote:
> OK, I'll resist the temptation to ask numerous questions about why
> I can't use ld here and just go with your suggestion...

Run gcc -v, see what it's doing.  If you don't understand everything
it does, I recommend letting it do it :-)

> gcc -shared -Wl,--whole-archive -fPIC -o libnew.so file5.o
> libfiles12.a libfiles34.a
> 
> /usr/lib/gcc/x86_64-redhat-
> linux/3.4.4/libgcc.a(_muldi3.oS)(.text+0x0): In function `__multi3':
> : multiple definition of `__multi3'
> /usr/lib/gcc/x86_64-redhat-
> linux/3.4.4/libgcc.a(_muldi3.oS)(.text+0x0): first defined here

Use -Wl,--no-whole-archive after your own libraries.


-- 
Daniel Jacobowitz
CodeSourcery


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