[(nowhere)] libc/1808: ld.so on powerpc-redhat-linux-gnu with ld -Ttext ...
Geoff Keating
geoffk@cygnus.com
Thu Jul 6 00:11:00 GMT 2000
> From: Anton Ertl <anton@a0.complang.tuwien.ac.at>
> Date: Thu, 6 Jul 2000 08:16:48 +0200 (MET DST)
> [anton@samhain tmp]$ gcc -O -Xlinker -Ttext -Xlinker 0x80000 xxx.c
> [anton@samhain tmp]$ objdump -p a.out
>
> a.out: file format elf32-powerpc
>
> Program Header:
> PHDR off 0x00000034 vaddr 0x00010034 paddr 0x00000000 align 2**2
> filesz 0x000000e0 memsz 0x000000e0 flags r-x
> INTERP off 0x00020114 vaddr 0x10000114 paddr 0x10000114 align 2**0
> filesz 0x0000000d memsz 0x0000000d flags r--
> LOAD off 0x00010000 vaddr 0x00080000 paddr 0x00080000 align 2**16
> filesz 0x0000024c memsz 0x0000024c flags r-x
> ...
> [anton@samhain tmp]$ LD_SHOW_AUXV=1 ./a.out
> AT_PHDR: 0x70034
> ...
Oh, I see!
Perhaps the kernel is correct, in a very weird sort of way. The PHDR
in this file is not loaded, so the kernel is quoting an address that
it would be at if it was loaded.
I believe that this is an invalid ELF file. The PHDR is supposed to
be loaded. Certainly, glibc requires that it is.
> > I think the physical segment offset thing is a side-effect of the way
> > the linker scripts work. You might try it with current devo first,
> > which has a completely different script for ppc.
>
> Where do I find that?
Sorry, I mean current sourceware CVS. See
< http://sourceware.cygnus.com >, look for binutils.
> > I also think the kernel should not look at the physical address at
> > all. You'll be happy to know that this code was rewritten for later
> > kernels, so maybe that fixed it.
>
> Which version? I may be able to get the admin of the machine to try
> it.
I'm not sure. 2.4.x?
Anyway, I now don't think changing the kernel will help. It's a
problem with the linker.
--
- Geoffrey Keating <geoffk@cygnus.com>
More information about the Libc-alpha
mailing list