aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/elf_common.h
Commit message (Collapse)AuthorAgeFilesLines
* Add extra visibility definitions.John Birrell2007-12-021-0/+3
| | | | | | | | | See: <http://groups.google.com/group/generic-abi/browse_thread/thread/1a84adc15666164> These are already in OpenSolaris and DTrace uses STV_ELIMINATE. Notes: svn path=/head/; revision=174139
* Correct PT_GNU_EH_FRAME definition.Alexander Kabaev2007-04-031-1/+1
| | | | Notes: svn path=/head/; revision=168286
* Add `PN_XNUM', for supporting ELF objects with a large number of programJoseph Koshy2006-11-141-0/+3
| | | | | | | header table entries. Notes: svn path=/head/; revision=164276
* PR:John Birrell2006-10-041-11/+468
| | | | | | | | | | | | | | | | | 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
* o Correct URL to ELF header documantation.Maxim Konovalov2006-05-311-2/+2
| | | | | | | | PR: kern/98213 Submitted by: Robert Gogolok Notes: svn path=/head/; revision=159103
* o Add the GNU symbol versioning section constants (SHT_GNU_verdef,Marcel Moolenaar2005-12-191-1/+4
| | | | | | | | SHT_GNU_verneed, SHT_GNU_versym), o Fix the definition of DT_HIOS -- it was short an 'f'... Notes: svn path=/head/; revision=153544
* Implement ELF symbol versioning using GNU semantics. This code aimsAlexander Kabaev2005-12-181-0/+25
| | | | | | | | | | | | to be compatible with symbol versioning support as implemented by GNU libc and documented by http://people.redhat.com/~drepper/symbol-versioning and LSB 3.0. Implement dlvsym() function to allow lookups for a specific version of a given symbol. Notes: svn path=/head/; revision=153515
* Get in sync with current ELF definitions. In particular this means:Marcel Moolenaar2005-12-181-48/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | o Remove the unused and non-standard SHT_NUM, PT_COUNT and DT_COUNT. o Add the STV_DEFAULT, STV_INTERNAL, STV_HIDDEN and STV_PROTECTED symbol visibility constants. o Add the ELF32_ST_VISIBILITY and ELF64_ST_VISIBILITY macros to get the symbol visibility from the st_other field. o Add the ELFOSABI_AIX, ELFOSABI_OPENVMS and ELFOSABI_NSK constants. o Add the ET_LOOS, ET_HIOS, ET_LOPROC and ET_HIPROC constants. o Further flesh out the list of machine types. Note that EM_ALPHA remains non-standard. The standard value for EM_ALPHA is given by EM_ALPHA_STD (which is a non-standard name :-) o Add the SHN_LOOS, SHN_HIOS and SHN_XINDEX constants. o Add the SHT_INIT_ARRAY, SHT_FINI_ARRAY, SHT_PREINIT_ARRAY, SHT_GROUP and SHT_SYMTAB_SHNDX constants. o Add the SHF_MERGE, SHF_STRINGS, SHF_INFO_LINK, SHF_LINK_ORDER, SHF_OS_NONCONFORMING, SHF_GROUP and SHF_MASKOS constants. o Add the PF_MASKOS and PF_MASKPROC constants. o Add the STB_LOOS andf STB_HIOS constants. o Add the STT_COMMON, STT_LOOS and STT_HIOS constants. MFC after: 1 week Notes: svn path=/head/; revision=153502
* Fix typo (in comment): s/IA-46/IA-64/Marcel Moolenaar2004-05-051-1/+1
| | | | | | | Submitted by: Miod Vallat <miod@online.fr> Notes: svn path=/head/; revision=128942
* Add defines required for TLS support.Alexander Kabaev2003-06-181-0/+2
| | | | Notes: svn path=/head/; revision=116540
* Add missing */Poul-Henning Kamp2003-06-181-1/+1
| | | | Notes: svn path=/head/; revision=116515
* - Add support for DT_FLAGS.Matthew N. Dodd2003-06-181-5/+51
| | | | | | | - Define various things from the most recent ELF spec. Notes: svn path=/head/; revision=116511
* - Call a SHT_REL 'relocation section' rather thanRobert Drehmel2002-08-111-2/+2
| | | | | | | | 'relation section'. - Put a space between a word and the end of comment delimiter. Notes: svn path=/head/; revision=101700
* Catch up with common usage:Marcel Moolenaar2001-09-081-0/+3
| | | | | | | | | | | | o Define ELFMAG and SELFMAG as an alternative to test the ELF magic. ELFMAG is the magic; SELFMAG is the size of the magic. Use with strncmp() or memcmp(). o Define SHT_NUM as the number of predefined sections. Note: style(9) deviation for consistency. Notes: svn path=/head/; revision=83228
* Add "ELFOSABI_NONE" which is the symbol used in a copy of the old ELF spec,David E. O'Brien2001-02-241-0/+1
| | | | | | | as an alias for "ELFOSABI_SYSV". Notes: svn path=/head/; revision=73000
* Update the e_machine values to include x86-64, PowerPC and [Strong]ARM;David E. O'Brien2001-01-011-5/+12
| | | | | | | and fix the Sparc values. Also update the ELFOSABI list while I'm here. Notes: svn path=/head/; revision=70567
* Add machine type for ia64.Doug Rabson2000-09-291-0/+1
| | | | Notes: svn path=/head/; revision=66455
* Change our ELF binary branding to something more acceptable to the BinutilsDavid E. O'Brien2000-04-181-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: svn path=/head/; revision=59342
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* The structure Elf_Note does not have 32 and 64 bit variants but alwaysDoug Rabson1999-05-071-1/+16
| | | | | | | | | | has 32bit fields. This change allows FreeBSD/alpha to generate well-formed ELF corefiles. Reviewed by: John Polstra <jdp@polstra.com> Notes: svn path=/head/; revision=46656
* Add generic defines ELF_ARCH, ELF_CLASS, and ELF_DATA. These giveJohn Polstra1998-09-141-1/+6
| | | | | | | | | | | 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
* Add definitions for the ELF section attribute flags, SHF_*.John Polstra1998-09-081-1/+7
| | | | | | | Submitted by: Robert Nordier <rnordier@nordier.com> Notes: svn path=/head/; revision=38954
* Revamp the ELF include files to better support architecture-independentJohn Polstra1998-08-161-0/+195
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