64-bit binutils problem
ok, i'm in way over my head here.
in arch/parisc64/real/head.S:
/* And the return address(es) too */
ldil L%start_parisc,%r10
ldo R%start_parisc(%r10),%r10
depdi 0, 31, 32, %r10
mtctl %r10,%cr18
ldo 4(%r10),%r10
mtctl %r10,%cr18which (after linking) becomes:
c0100074: 21 42 28 07 ldil -3fcfb000,r10
c0100078: 35 4a 09 c0 ldo 4e0(r10),r10
c010007c: f5 40 0c 00 depdi 0,31,32,r10
c0100080: 02 4a 18 40 mtctl r10,pcoq
c0100084: 35 4a 00 08 ldo 4(r10),r10
c0100088: 02 4a 18 40 mtctl r10,pcoqhowever, C03054E0 is in the middle of gateway_init and start_parisc is nowhere to be found, except as:
0000000000000000 F *UND* 0000000000000304 start_parisc
which seems rather bogus to me. i'll put my compiled kernel tree up on pehc:/home/willy/parisc64/ in a few moments.
p.s. does anyone want to change the `-3fcfb000' to an unsigned representation? this would please me more:
c0100074: 21 42 28 07 ldil ffffffffc0305000,r10
c0100078: 35 4a 09 c0 ldo 4e0(r10),r10
c010007c: f5 40 0c 00 depdi 0,31,32,r10as it would make it more clear exactly what's going on.
p.p.s. anyone know why my piece of debug code:
ldil 0xdecf0000, %r9
is getting assembled as:
c0100000: 21 20 0f 00 ldil 78000000,r9
? ser pim hpmc dumps show the value 78000008 in r9, so i'm convinced it's not objdump misdisassembling it.
Signature · 1 line
Revolutions do not require corporate support.
Quoted 7 lines · Matthew Wilcox
p.p.s. anyone know why my piece of debug code:
ldil 0xdecf0000, %r9is getting assembled as:
c0100000: 21 20 0f 00 ldil 78000000,r9
You've told the assembler to plug in the constant 0xdecf0000 to a ldil instruction. ldil has a 21 bit field so you only get the bottom 21 bits of your constant. The number they represent is the constant shifted left by 11 bits. Just happens to be 78000000 :-)
Try "ldil L%0xdecf000,%r9"
'twould be a lot nicer if "objdump -d" produced output that could be fed back into the assembler, in which case you'd see the L%. I may even fix it one day when I find I have nothing to do...
Alan
Signature · 1 line
Linuxcare. Support for the Revolution.
Quoted 2 lines · Matthew Wilcox
ok, i'm in way over my head here.
to help anyone trying to reproduce the problem, i've created a simpler testcase. it's findable at
ftp://puffin.external.hp.com/pub/parisc/debug/64link.tgz
and contains a file called `Makescript' which shows you how I got from each of the source files to the object files. it's only 19k, not 90+MB now :-)
Signature · 1 line
Revolutions do not require corporate support.