[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 64bits & df



On Wed, 12 Nov 2003 19:27:45 -0800
"David S. Miller" <davem@redhat.com> wrote:

> ./hello: error while loading shared libraries: /lib64/libc.so.6: unexpected reloc type 0x08
 ...
> Actually, it seems that a R_SPARC_WDISP22 case needs to be added to
> the switch statement in GLIBC's:
> 
> 	sysdeps/sparc/sparc64/dl-machine.h:elf_machine_rela()

Hold on, I might be wrong here.  WDISP22 dynamic relocations
should never show up in libc.

Looking at the bogus WDISP22 relocation in libc.so.6 we find
this:

0xc89e8 <vfork>:        mov  %o7, %o1
0xc89ec <vfork+4>:      sethi  %hi(0x192c00), %o0
0xc89f0 <vfork+8>:      call  0xc89e0 <fork+128>
0xc89f4 <vfork+12>:     add  %o0, 0x270, %o0    ! 0x192e70
0xc89f8 <vfork+16>:     sethi  %hi(0), %o2
0xc89fc <vfork+20>:     mov  %o1, %o7
0xc8a00 <vfork+24>:     or  %o2, 0xb8, %o2
0xc8a04 <vfork+28>:     ldx  [ %o0 + %o2 ], %o2
0xc8a08 <vfork+32>:     ldx  [ %o2 ], %o0
0xc8a0c <vfork+36>:     cmp  %o0, 0
0xc8a10 <vfork+40>:     bne  0xc8a10 <vfork+40>
			     ^^^^^^^
			     R_SPARC_WDISP22 relocation

0xc8a14 <vfork+44>:     mov  0x42, %g1
0xc8a18 <vfork+48>:     ta  0x6d
0xc8a1c <vfork+52>:     bcs,pn   %xcc, 0xc8a30 <vfork+72>
0xc8a20 <vfork+56>:     nop
0xc8a24 <vfork+60>:     dec  %o1
0xc8a28 <vfork+64>:     retl
0xc8a2c <vfork+68>:     and  %o0, %o1, %o0

I'm not looking at the debian glibc sparc sources to see where
this bogus relocation is coming from.  It's probably a binutils
bug, but I've done enough jumping to conclusions this evening :)



Reply to: