tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: EH handling and PR/39986
On Fri, Dec 24, 2010 at 08:37:58AM +0000, Nick Hudson wrote:
> Attached are diffs (minus gcc mknative re-run) to support the PT_GNU_EH_FRAME
> and dl_iterate_phdr method for finding unwind information for exception
> handling. This is described in more detail here:
>
> http://www.airs.com/blog/archives/166
Attached is the first major part of the kernel support needed for using
this with statically linked binaries. Basically, we want to pass down
the auxinfo in that case too, so that the ELF header can be found.
This doesn't work completely for compat32 yet as ps_strings is broken in
that case.
Joerg
Index: src/sys/compat/netbsd32/netbsd32_exec_elf32.c
===================================================================
--- src/sys/compat/netbsd32/netbsd32_exec_elf32.c
+++ src/sys/compat/netbsd32/netbsd32_exec_elf32.c
@@ -113,11 +113,11 @@
{
if (itp && epp->ep_interp == NULL) {
extern const char machine32[];
(void)compat_elf_check_interp(epp, itp, machine32);
}
- epp->ep_flags |= EXEC_32;
+ epp->ep_flags |= EXEC_32 | EXEC_FORCEAUX;
epp->ep_vm_minaddr = VM_MIN_ADDRESS;
epp->ep_vm_maxaddr = USRSTACK32;
#ifdef ELF_INTERP_NON_RELOCATABLE
*pos = ELF_LINK_ADDR;
#endif
Index: src/sys/kern/exec_elf.c
===================================================================
--- src/sys/kern/exec_elf.c
+++ src/sys/kern/exec_elf.c
@@ -931,7 +931,8 @@
if ((error = ELF_MD_PROBE_FUNC(l, epp, eh, itp, pos)) != 0)
return error;
#elif defined(ELF_INTERP_NON_RELOCATABLE)
*pos = ELF_LINK_ADDR;
#endif
+ epp->ep_flags |= EXEC_FORCEAUX;
return 0;
}
Home |
Main Index |
Thread Index |
Old Index