Re: ld -defsym option

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

 



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

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux