[Top] [All Lists]

Re: help with asm errors

Subject: Re: help with asm errors
From: (Paul Antoine)
Date: Sun, 11 May 1997 09:04:14 +1000 (EST)
In-reply-to: <> from "David Monro" at May 11, 97 00:24:52 am
Organization: Softway Pty Ltd
David Monro wrote:

> Background - I'm trying to compile Paul's decstation kernel for a Magnum 
> 3000. I'm using Paul's kernel because the 2.1.36 has too many r40000isms. 
> I'm using the include/asm/bitops.h from 2.1.36 (since the 2.1.1 bitops.h 
> fails for a big endian compile). I get most of the way there and then it 
> dies with the following error:
> mips-linux-gcc -D__KERNEL__ -I/amd/milawa/root/u2/staff/davidm/mips/li
> nux-2.1.1.dec/include -Wall -Wstrict-prototypes -O2 -fomit-frame-point
> er -G 0 -mno-abicalls -fno-pic -mcpu=r3000 -mips1  -c head.S -o head.o
> head.S: Assembler messages:
> head.S:665: Warning: Used $at without ".set noat"
> head.S:705: Error: attempt to .org/.space backwards? (-53796)
> head.S:705: Fatal error: Cannot write to output file.
> make[1]: *** [head.o] Error 1
> Line 665 is SAVE_ALL, 

Don't worry about this one for now...

> and line 705 is the end of file. Not being intimately
> familiar with mips asm, I currently don't have much clue here... help?

The fatal error at 705 is saying that the 'origin' or asm equivalent of 
the PC is being moved backwards in the address space by either a .org or 
.space directive.  The .org sets the present compile address, so:

        .org    0x80000000

would make the assembler compile any code that follows begining at that

The assembler is having trouble with the series of .org directives at the
end of head.S that look like this:

                        .org    0x1000

                        .org    0x2000


These should result in the 0x1000 being 'added' to the link address for
this module (e.g. on the DECStation swapper_pg_dir is at 0x80031000, and 
empty_bad_page is at 0x80033000).

It would seem that the assembler thinks that this address is 'backwards'
from where it's up to, the only reason for which is that there is somehow 
more code in there than there was! This is hard to believe, because on my
machine, the cpu_probe routine finishes about 0x770 bytes from the link

Try compiling with the '.org' lines commented out, and then use objdump 
to dissassemble the module to see where cpu_probe ends...

Paul M. Antoine,                                        Net:
Softway Pty Ltd                                         WWW:
PO Box 305, Strawberry Hills, NSW 2012, Australia       Tel: +61 2 9698 2322
Level 2, 79 Myrtle St, Chippendale, NSW 2008, Australia Fax: +61 2 9699 9174

"It is the lack of acceptance of diversity which threatens to 
 destroy society, NOT the free expression of it." - Me.

<Prev in Thread] Current Thread [Next in Thread>