Subject: Re: -current brokenness with dynamic executables
To: Christos Zoulas <christos@zoulas.com>
From: Castor Fu <castor@geocast.net>
List: current-users
Date: 01/05/1999 02:08:52
> >I'm still getting over holidays and catching up on mail.  Did any signal
> >stuff change recently (the PSIG in the first ktrace)?  If I get no
> >leads, I'll look at this further tomorrow...
> 
> It might have to do with my recent changes to exec_elf32.c to recognize
> the NetBSD elf pnote signature. I doubt it though...

A problem that I just noticed in exec_elf32.c [or in my toolchain] is that
uvm_map assumes its callers provide page-aligned addresses, and 
vmcmd_map_pagedvn() enforces it.  My strip'ed executables don't have
problems with this, but non-stripped ones do.  

For now, I've patched around this as follows:

/*      $NetBSD: exec_elf32.c,v 1.39 1998/10/03 20:39:32 christos Exp $ */

diff -r1.1.1.3 exec_elf32.c
285,286c285,288
<               if (ph->p_align > 1)
<                       *addr = ELF_TRUNC(uaddr, ph->p_align);
---
>               if (ph->p_align > 1) {
>                       /* XXX this should be aligned elsewhere */
>                       *addr = ELF_TRUNC(uaddr, PAGE_SIZE);
>               }

	-castor