This is the mail archive of the binutils@sources.redhat.com 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: M68k 2.9.1 unknown-seg error


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


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