[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ld -defsym option

From: Fabio Alemagna
Subject: Re: ld -defsym option
Date: Tue, 8 Jul 2003 14:09:56 +0200 (CEST)

On Tue, 8 Jul 2003, S kris wrote:

> Hi,
> I am trying to link the x.o and sample.a (contains y.o) using ld for
> creating executable. I have used -defsym xsymbol=ysymbol as the linker
> option for changing the symbol "xsymbol" defined in x.c to the symbol
> "ysymbol" defined in y.c. But i get the error "Undefined symbol
> 'ysymbol' referenced in x.o". What may be the reason for this error? Is
> this something to do with archive?
> Please help me in fixing this?

Symbol names have to be specified using the same mangling as they have in
the compiler's asm output. The m68k port of gcc puts a '_' before every
symbol's name, hence you should use -defsym _xsymbol=_ysymbol.

Fabio Alemagna

reply via email to

[Prev in Thread] Current Thread [Next in Thread]