Summary: | Differentiation of FreeBSD & Linux ELF binaries [patch] | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Sujal Patel <smpatel> | ||||
Component: | kern | Assignee: | smpatel | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | Normal | ||||||
Version: | 2.2-CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Sujal Patel
1996-03-27 03:30:03 UTC
On Tue, 26 Mar 1996, Sujal Patel wrote: > >Synopsis: Differentiation of FreeBSD & Linux ELF binaries [patch] > > 3. Follow the "interp" sections hints (current behavior) unless the > environment variable COMPAT_SYSVEC exists. If the variable exists, it > overrides the sysvec in the "interp" section. This means that we can now > invoke Linux ELF binaries by: > > (export COMPAT_SYSVEC=linux; linux.helloworld.elf.static) Maybe I was a bit too tired when I wrote this patch, but I don't really think it's a good idea to let the kernel parse the environment :) How about instead of that, add an extra argument to the execve() syscall (to hold the emulation type requested), and then have libc pass in the emulation type requested (by reading the COMPAT_SYSVEC environment variable). Also, the libc exec() and friends can strip out the COMPAT_SYSVEC environment variable, so it is not inherited by the processes children (which is probably the desired behavior?). Comments? Sujal Responsible Changed From-To: freebsd-bugs->smpatel This is my PR, and I'm working on a better approach for fixing this. State Changed From-To: open->closed Fixed by sos in v1.1 of brandelf.c |