diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2000-04-18 02:39:26 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2000-04-18 02:39:26 +0000 |
commit | c815a20cb23f53317c4d23d1884cd5e486dee876 (patch) | |
tree | f76576487158a5c7e15c4d35440dc09db280a7da /sys/compat/svr4 | |
parent | 8d396be510de9306b0efd32352a69860d7d195fc (diff) | |
download | src-c815a20cb23f53317c4d23d1884cd5e486dee876.tar.gz src-c815a20cb23f53317c4d23d1884cd5e486dee876.zip |
Change our ELF binary branding to something more acceptable to the Binutils
maintainers.
After we established our branding method of writing upto 8 characters of
the OS name into the ELF header in the padding; the Binutils maintainers
and/or SCO (as USL) decided that instead the ELF header should grow two new
fields -- EI_OSABI and EI_ABIVERSION. Each of these are an 8-bit unsigned
integer. SCO has assigned official values for the EI_OSABI field. In
addition to this, the Binutils maintainers and NetBSD decided that a better
ELF branding method was to include ABI information in a ".note" ELF
section.
With this set of changes, we will now create ELF binaries branded using
both "official" methods. Due to the complexity of adding a section to a
binary, binaries branded with ``brandelf'' will only brand using the
EI_OSABI method. Also due to the complexity of pulling a section out of an
ELF file vs. poking around in the ELF header, our image activator only
looks at the EI_OSABI header field.
Note that a new kernel can still properly load old binaries except for
Linux static binaries branded in our old method.
*
* For a short period of time, ``ld'' will also brand ELF binaries
* using our old method. This is so people can still use kernel.old
* with a new world. This support will be removed before 5.0-RELEASE,
* and may not last anywhere upto the actual release. My expiration
* time for this is about 6mo.
*
Notes
Notes:
svn path=/head/; revision=59342
Diffstat (limited to 'sys/compat/svr4')
-rw-r--r-- | sys/compat/svr4/svr4_sysvec.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/compat/svr4/svr4_sysvec.c b/sys/compat/svr4/svr4_sysvec.c index b470157123b5..c66e61b2b304 100644 --- a/sys/compat/svr4/svr4_sysvec.c +++ b/sys/compat/svr4/svr4_sysvec.c @@ -155,7 +155,7 @@ int bsd_to_svr4_errno[ELAST+1] = { }; -static int svr4_fixup(long **stack_base, struct image_params *imgp); +static int svr4_fixup(register_t **stack_base, struct image_params *imgp); extern struct sysent svr4_sysent[]; #undef szsigcode @@ -183,8 +183,8 @@ struct sysentvec svr4_sysvec = { }; Elf32_Brandinfo svr4_brand = { - "SVR4", - "/compat/svr4", + ELFOSABI_SOLARIS, /* XXX Or should we use ELFOSABI_SYSV here? */ + svr4_emul_path, "/lib/libc.so.1", &svr4_sysvec }; @@ -192,10 +192,10 @@ Elf32_Brandinfo svr4_brand = { const char svr4_emul_path[] = "/compat/svr4"; static int -svr4_fixup(long **stack_base, struct image_params *imgp) +svr4_fixup(register_t **stack_base, struct image_params *imgp) { Elf32_Auxargs *args = (Elf32_Auxargs *)imgp->auxargs; - long *pos; + register_t *pos; pos = *stack_base + (imgp->argc + imgp->envc + 2); |