This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Undefined Symbol Error in GAS
- To: wolfgang dot gertzen at micromatik dot com, binutils at sources dot redhat dot com
- Subject: Re: Undefined Symbol Error in GAS
- From: "Steve deRosier" <sderosier at vari-lite dot com>
- Date: Tue, 27 Feb 2001 14:31:50 -0600
Wolfgang,
I have recently successfully moved a few of our projects from the MRI tools
to the GNU toolchain. A nontrivial exercise, but definitely doable. I also
ran into the same sort of problem you had, primarily with statements such as
(I defined the symbols .STARTOF.(stack) and .SIZEOF.(stack) in the linker
file to get the necessary behavior since GNU doesn't support these Microtec
psudofunctions):
LEA.L .STARTOF.(stack)+.SIZEOF.(stack),SP * initialize stack pointer
I just went and replaced it with:
LEA.L .STARTOF.(stack),SP
ADDA.L #.SIZEOF.(stack),SP
Note that I didn't re-code this assembly file, I used the MRI compatibility
mode (-M) of gas and only fixed up the few parts that needed it.
You probably can figure out something equivalent for your problem, just keep
in mind that GAS doesn't support the construct that you are having problems
with (as per Ian's answer).
Hope this helps,
- Steve
--
Steve deRosier
Embedded Software Engineer
Vari-Lite International, Inc.
----------
>From: info@micromatik.com
>To: binutils@sources.redhat.com
>Subject: Undefined Symbol Error in GAS
>Date: Tue, Feb 27, 2001, 9:17 AM
>
> Hi !
>
> I'am testing if a can replace the Microtec Compiler by the
> GNU assembler.
>
> When I try to assemble the following example I received some error
> messages (as68 is my 68K cross GAS):
>
> .title "wg1.S"
> .text
>
> * .equ fooVar, 10
>
> wg: dc.l 10+fooVar+testVar
> wg2: dc.l 10+fooVar
>
>
> Command line Messages:
>
> wolfgang@linux-se:~/Develop/misc > as68 wg1.S
> wg1.S: Assembler messages:
> wg1.S:6: Error: undefined symbol fooVar in operation
> wg1.S:6: Error: undefined symbol testVar in operation
>
>
> So when I uncomment the ".equ fooVar" line then there were no error
> messages any more!!!
>
> My question is:
> "Is the GAS unable to handel more than one external reference in one
> assembler statement ?"
>
> thanks
>
> wolfgang
>
>
>
>
>
>
>
> ------------------------------------------------
> Wolfgang Gertzen
> Micromatik GmbH
> 57074 Siegen
> Tel.:0271/50150
> wolfgang.gertzen@micromatik.com