Subject: Re: va 0 mapped - NULL pointer dereference succeeds
To: None <M.Drochner@fz-juelich.de, email@example.com,>
From: Charles M. Hannum <firstname.lastname@example.org>
Date: 10/24/2003 17:40:43
On Friday 24 October 2003 05:31 pm, Matthias Drochner wrote:
> Hi -
> on a pmax/-current, compiled with gcc3, I'm observing
> # pmap
> 00000000 52K read/exec /libexec/ld.elf_so
> 0000D000 252K [ anon ]
> 0004C000 8K read/write [ anon ]
> 00400000 208K read/exec /bin/csh
> And indeed, a small (dynamically linked) test program can read
> from NULL, gets the contents of /libexec/ld.elf_so as expected.
> This shouldn't happen...
MIPS is still defining ELF_INTERP_NON_RELOCATABLE, a vestige from before I
made ld.elf_so relocatable on that platform. My guess is that a newer
version of binutils stopped linking it with the traditional VA offset
(0x5ffe0000), and so now it's mapping at 0.
Either the ld scripts should be fixed to use the old offset, or
ELF_INTERP_NON_RELOCATABLE should be removed, or both. It certainly makes no
sense as is.