This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: M68k 2.9.1 unknown-seg error
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: GroundVehicle2 at aol dot com
- Cc: binutils at sources dot redhat dot com
- Date: 28 Jan 2004 09:47:40 -0500
- Subject: Re: M68k 2.9.1 unknown-seg error
- References: <452E0BAE.58BF2A37.3FA80DE9@aol.com>
GroundVehicle2@aol.com writes:
> Does anyone know why I get the "unknown-seg symbol" error when trying to assemble the following code and error messages:
>
> ***** Example *****
> 1 .extern _cat
> 2 .section .catdog
> 3 _dog:
> 4 nop
> 5 .dc.l _cat-_dog /* This line assmebles just fine */
> 6 .dc.l _dog-_cat /* This line does not assmble */
> 7 nop
> 8 .end
> *******************
> C:\GNU>m68k-coff-as -m68040 example.s
> example.s: Assembler messages:
> example.s:0: Warning: end of file not at end of a line; newline inserted
> example.s:6: Error: Can't emit reloc {- unknown-seg symbol "_cat"} @ file address 6.
COFF only supports specific relocation types, not arbitrary
expressions.
_cat - _dog can be expressed as a PC relative relocation with an
addend.
_dot - _cat can not be expressed at all. It would require a
relocation which took a symbol value and negated it. There is no such
relocation type in m68k COFF.
Ian