aboutsummaryrefslogtreecommitdiff
path: root/sys/i386/include/elf.h
Commit message (Collapse)AuthorAgeFilesLines
* sys: Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-161-1/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* Convert machine/elf.h, machine/frame.h, machine/sigframe.h,Konstantin Belousov2013-02-201-115/+3
| | | | | | | | | | | | | | | | | machine/signal.h and machine/ucontext.h into common x86 includes, copying from amd64 and merging with i386. Kernel-only compat definitions are kept in the i386/include/sigframe.h and i386/include/signal.h, to reduce amd64 kernel namespace pollution. The amd64 compat uses its own definitions so far. The _MACHINE_ELF_WANT_32BIT definition is to allow the sys/boot/userboot/userboot/elf32_freebsd.c to use i386 ELF definitions on the amd64 compile host. The same hack could be usefully abused by other code too. Notes: svn path=/head/; revision=247047
* Reserve AT_TIMEKEEP auxv entry for providing usermode the pointer toKonstantin Belousov2012-06-221-0/+1
| | | | | | | | | timekeeping information. MFC after: 1 week Notes: svn path=/head/; revision=237430
* Add AT_STACKPROT elf aux vector. Will be used to inform rtld about theKonstantin Belousov2011-01-071-1/+2
| | | | | | | initial stack protection set by the kernel image activator. Notes: svn path=/head/; revision=217097
* Supply some useful information to the started image using ELF aux vectors.Konstantin Belousov2010-08-171-1/+7
| | | | | | | | | | | In particular, provide pagesize and pagesizes array, the canary value for SSP use, number of host CPUs and osreldate. Tested by: marius (sparc64) MFC after: 1 month Notes: svn path=/head/; revision=211412
* Define architectural load bases for PIE binaries. Addresses were selectedKonstantin Belousov2009-10-101-0/+2
| | | | | | | | | | | | | by looking at the bases used for non-relocatable executables by gnu ld(1), and adjusting it slightly. Discussed with: bz Reviewed by: kan Tested by: bz (i386, amd64), bsam (linux) MFC after: some time Notes: svn path=/head/; revision=197933
* Add AT_EXECPATH ELF auxinfo entry type. The value's a_ptr is a pointerKonstantin Belousov2009-03-171-4/+2
| | | | | | | | | | | | | to the full path of the image that is being executed. Increase AT_COUNT. Remove no longer true comment about types used in Linux ELF binaries, listed types contain FreeBSD-specific entries. Reviewed by: kan Notes: svn path=/head/; revision=189926
* AT_DEBUG and AT_BRK were OBE like 10 years ago, so retire them.Warner Losh2008-12-171-12/+0
| | | | | | | Reviewed by: peter Notes: svn path=/head/; revision=186212
* PR:John Birrell2006-10-041-32/+0
| | | | | | | | | | | | | | | | | Submitted by: Reviewed by: Approved by: Obtained from: MFC after: Security: Move the relocation definitions to the common elf header so that DTrace can use them on one architecture targeted to a different one. Add the additional ELF types defines in Sun's "Linker and Libraries" manual. Notes: svn path=/head/; revision=163016
* Add definitions for TLS relocations.Doug Rabson2004-08-021-1/+21
| | | | Notes: svn path=/head/; revision=133027
* Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bitPeter Wemm2003-09-251-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | systems where the data/stack/etc limits are too big for a 32 bit process. Move the 5 or so identical instances of ELF_RTLD_ADDR() into imgact_elf.c. Supply an ia32_fixlimits function. Export the clip/default values to sysctl under the compat.ia32 heirarchy. Have mmap(0, ...) respect the current p->p_limits[RLIMIT_DATA].rlim_max value rather than the sysctl tweakable variable. This allows mmap to place mappings at sensible locations when limits have been reduced. Have the imgact_elf.c ld-elf.so.1 placement algorithm use the same method as mmap(0, ...) now does. Note that we cannot remove all references to the sysctl tweakable maxdsiz etc variables because /etc/login.conf specifies a datasize of 'unlimited'. And that causes exec etc to fail since it can no longer find space to mmap things. Notes: svn path=/head/; revision=120422
* Hack to enable getting two different elf32 and elf64 loaders in thePeter Wemm2003-05-011-0/+13
| | | | | | | same i386 loader binary. Notes: svn path=/head/; revision=114377
* Move the definition of ElfN_Hashelt to common headers. The only platformDoug Rabson2002-05-301-11/+0
| | | | | | | which has a different definition for this is alpha. Notes: svn path=/head/; revision=97564
* Make MAXTSIZ, DFLDSIZ, MAXDSIZ, DFLSSIZ, MAXSSIZ, SGROWSIZ loaderPaul Saab2001-10-101-1/+1
| | | | | | | | | | tunable. Reviewed by: peter MFC after: 2 weeks Notes: svn path=/head/; revision=84783
* Use a machine dependent type, Elf_Hashelt, for the elements of the elfJake Burkholder2001-07-311-0/+11
| | | | | | | | | | | dynamic symbol table buckets and chains. The sparc64 toolchain uses 32 bit .hash entries, unlike other 64 bits architectures (alpha), which use 64 bit entries. Discussed with: dfr, jdp Notes: svn path=/head/; revision=80700
* Fix style of defines.David E. O'Brien2001-06-091-38/+38
| | | | Notes: svn path=/head/; revision=77931
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"Peter Wemm1999-12-291-2/+2
| | | | | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come. Notes: svn path=/head/; revision=55205
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* On the i386, load the ELF dynamic linker where an mmap(0, ...) wouldJohn Polstra1999-02-191-5/+7
| | | | | | | | | | | | put it, just like on the Alpha. It was wrong to load it at the fixed address 0x08000000. That should only be done if the dynamic linker is an executable (not a shared object) with a specific load address encoded in the object file itself. This fixes the recent breakage in the Linux emulator. Notes: svn path=/head/; revision=44131
* Change the load address of the ELF dynamic linker from "2L*MAXDSIZ"John Polstra1999-02-071-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | to an architecture-specific value defined in <machine/elf.h>. This solves problems on large-memory systems that have a high value for MAXDSIZ. The load address is controlled by a new macro ELF_RTLD_ADDR(vmspace). On the i386 it is hard-wired to 0x08000000, which is the standard SVR4 location for the dynamic linker. On the Alpha, the dynamic linker is loaded MAXDSIZ bytes beyond the start of the program's data segment. This is the same place a userland mmap(0, ...) call would put it, so it ends up just below all the shared libraries. The rationale behind the calculation is that it allows room for the data segment to grow to its maximum possible size. These changes have been tested on the i386 for several months without problems. They have been tested on the Alpha as well, though not for nearly as long. I would like to merge the changes into 3.1 within a week if no problems have surfaced as a result of them. Notes: svn path=/head/; revision=43750
* Add an ELF_MACHINE_OK() macro for compatability with the Alpha version.Peter Wemm1998-10-181-1/+3
| | | | Notes: svn path=/head/; revision=40513
* Add generic defines ELF_ARCH, ELF_CLASS, and ELF_DATA. These giveJohn Polstra1998-09-141-1/+3
| | | | | | | | | | | the relevant characteristics of the native machine, for building and checking Elf_Ehdr structures. Add structures to represent ELF "note" headers. Add defines for the note types used in ELF core files. Notes: svn path=/head/; revision=39189
* Revamp the ELF include files to better support architecture-independentJohn Polstra1998-08-161-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | applications. Here's how it works. The kernel should include <machine/elf.h> to get the definitions for the native architecture. It can reference the various ELF structures with generic names like Elf_Sym, Elf_Shdr, etc. A define __ELF_WORD_SIZE is also available with the value 32 or 64 as appropriate for the native architecture. Generic applications should include <elf.h>, which is just a wrapper for <machine/elf.h>. Applications such as object file dumpers that need to deal with foreign ELF files can include <sys/elf32.h> and/or <sys/elf64.h>. Both can be included from the same source file if desired. The structure names must be referenced using wordsize-specific names like Elf32_Sym, Elf64_Shdr, etc. I haven't change the alpha stuff, but I haven't broken it either. Notes: svn path=/head/; revision=38357
* Define some machine characteristics using symbol naming on conventionsPeter Wemm1997-08-301-1/+7
| | | | | | | in place in the other BSD's. Notes: svn path=/head/; revision=28942
* Fill out the ELF header files to make them more or less complete.John Polstra1997-05-211-0/+106
Fix a macro name that was misspelled both in brandelf.c and imgact_elf.h. Notes: svn path=/head/; revision=25984