aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/elf_common.h
Commit message (Collapse)AuthorAgeFilesLines
* Move/add ARM ELF PHDR types to elf_common.hEd Maste2016-08-021-0/+2
| | | | | | | Accidentally missed in r303674 Notes: svn path=/head/; revision=303677
* Add ELFOSABI_ARM_AEABI ELF OSABI constantEd Maste2016-08-021-0/+1
| | | | | | | | Reported by: andrew Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=303670
* Add and correct MIPS relocation typesEd Maste2016-05-301-2/+8
| | | | | | | | | | | | | | | | The correct names for R_MIPS_GOT_HI16 and R_MIPS_GOT_LO16 have a _ after GOT. The nonstandard names (R_MIPS_GOTHI16, R_MIPS_GOTLO16) in the FreeBSD elf_common.h header also had incorrect values and were not used in the tree, so just remove them. Add other MIPS relocation types found in FreeBSD/mips64 object files. Reviewed by: imp, jmallett MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6561 Notes: svn path=/head/; revision=301006
* elf_common.h: add section header flag and dynamic typesEd Maste2016-05-191-0/+3
| | | | | | | | | | | | SHF_COMPRESSED section contains compressed data DT_TLSDESC_PLT Location of PLT entry for TLS descriptor resolver calls DT_TLSDESC_GOT Location of GOT entry used by resolver PLT entry MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=300231
* Rename SHT_AMD64_UNWIND to SHT_X86_64_UNWIND per ABI docEd Maste2016-04-071-1/+2
| | | | | | | From http://www.x86-64.org/documentation_folder/abi-0.99.pdf Notes: svn path=/head/; revision=297686
* Add STT_SPARC_REGISTER ELF definitionEd Maste2016-01-261-2/+3
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=294844
* Add STB_GNU_UNIQUE symbol binding definitionEd Maste2016-01-211-2/+3
| | | | | | | | | | | | | | | | | Red Hat created STB_GNU_UNIQUE to handle certain special cases relating to dynamically loading C++ DSOs[1]. We don't (currently) have support for STB_GNU_UNIQUE, but ought to reserve the value in ELFNN_ST_BIND. This will also be used by an upcoming ELF Tool Chain import. [1] https://www.redhat.com/archives/posix-c++-wg/2009-August/msg00002.html MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=294530
* Add RISC-V relocation types.Ruslan Bukin2016-01-181-0/+50
| | | | | | | Reviewed by: emaste Notes: svn path=/head/; revision=294279
* Add definitions for ELF note types used in executablesEd Maste2015-12-061-0/+5
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=291909
* Add .gnu.versym VERSYM_HIDDEN flag and related maskEd Maste2015-10-091-0/+6
| | | | | | | | MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=289070
* Add MIPS ELF section type SHT_MIPS_ABIFLAGS definitionEd Maste2015-09-221-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=288081
* Add RISC-V ELF machine type definitionEd Maste2015-07-241-0/+1
| | | | | | | | | | EM_RISCV is now officially registered as e_machine 243. MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=285841
* Add GRP_COMDAT section group flag to ELF headerEd Maste2015-05-191-0/+3
| | | | | | | | | | Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2582 Notes: svn path=/head/; revision=283110
* Add ELF machine EM_IAMCU, 32-bit Intel MCUEd Maste2015-05-141-0/+1
| | | | | | | It is e_machine 6, which was previously reserved for 486. Notes: svn path=/head/; revision=282916
* Add R_AARCH64_NONE, the null relocation.Andrew Turner2015-04-091-0/+1
| | | | Notes: svn path=/head/; revision=281308
* Speed up symbol lookup for the amd64 kernel modules.Konstantin Belousov2015-04-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | Amd64 uses relocatable object files as the modules format. It is good WRT not having unneeded overhead for PIC code, in particular, due to absence of useless GOT and PLT. But the cost is that the module linking process cannot use hash to speed up the symbol lookup, and that each reference to the symbol requiring a relocation, instead of single-place relocation in GOT. Cache the successfull symbol lookup results in the module symbol table, using the newly allocated SHN_FBSD_CACHED value from SHN_LOOS-HIOS range as an indicator. The SHN_FBSD_CACHED together with the non-existent definition of the found symbol are reverted after successfull relocations, which is done under kld_sx lock, so it should not be visible to other consumers of the symbol table. Submitted by: Conrad Meyer Differential Revision: https://reviews.freebsd.org/D1718 MFC after: 3 weeks Notes: svn path=/head/; revision=281003
* Fill out arm64 dynamic relocation #definesEd Maste2015-03-301-0/+4
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=280858
* Update the ELFOSABI_* constants.Ed Schouten2015-03-061-0/+2
| | | | | | | | | Two new operating systems have been added in the meantime. ELFOSABI_FENIXOS that uses value 16 (published in the latest draft) and ELFOSABI_CLOUDABI that uses value 17 (to be published in the next draft). Notes: svn path=/head/; revision=279698
* Add missing R_X86_64_ constants to elf_common.hEd Maste2015-01-211-0/+13
| | | | | | | | | PR: 196918 MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=277464
* Missed the header for the note definition.Justin Hibbits2015-01-031-0/+1
| | | | | | | | X-MFC-with: r276634 MFC after: 2 weeks Notes: svn path=/head/; revision=276636
* Update ELF headers to include additional definesEd Maste2015-01-021-0/+216
| | | | | | | | | | | | | | | | | The elftoolchain project includes these additional defines for various userland programs. Given that arch-specific defines are still interesting in the context of userland programs reading or writing ELF metadata, they should be included in top-level ELF headers. Remove duplicate defines from ARM and MIPS elf headers. Submitted by: will (initial version) Reviewed by: imp, will Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D844 Notes: svn path=/head/; revision=276539
* Add AArch64 64-bit relocation values. These will be needed by rtld whenAndrew Turner2014-12-181-0/+12
| | | | | | | | | | | we import it along with utilities in elftoolchain. Differential Revision: https://reviews.freebsd.org/D1330 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=275903
* Improve support for XSAVE with debuggers.John Baldwin2014-11-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | - Dump an NT_X86_XSTATE note if XSAVE is in use. This note is designed to match what Linux does in that 1) it dumps the entire XSAVE area including the fxsave state, and 2) it stashes a copy of the current xsave mask in the unused padding between the fxsave state and the xstate header at the same location used by Linux. - Teach readelf() to recognize NT_X86_XSTATE notes. - Change PT_GET/SETXSTATE to take the entire XSAVE state instead of only the extra portion. This avoids having to always make two ptrace() calls to get or set the full XSAVE state. - Add a PT_GET_XSTATE_INFO which returns the length of the current XSTATE save area (so the size of the buffer needed for PT_GETXSTATE) and the current XSAVE mask (%xcr0). Differential Revision: https://reviews.freebsd.org/D1193 Reviewed by: kib MFC after: 2 weeks Notes: svn path=/head/; revision=274817
* Allow libkvm to get the kernel va to pa delta without the need forAndrew Turner2014-10-191-0/+2
| | | | | | | | | | | | | | | physaddr. This should allow for a kernel where PHYSADDR and KERNPHYSADDR are both undefined. For now libkvm will use the old method of reading physaddr and kernaddr to allow it to work with old kernels. This could be removed in the future when enough time has passed. Differential Revision: https://reviews.freebsd.org/D939 MFC after: 1 week Notes: svn path=/head/; revision=273284
* Rename DT_FEATURE_1 to DT_FEATUREEd Maste2014-08-211-1/+1
| | | | | | | | | | | This provides a minor cleanup in elfdump; there are otherwise no consumers in the tree. Old SUN documentation can be found for either variant, but GNU binutils switched to DT_FEATURE around 2000. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=270303
* elfdump: add EM_AARCH64 64-bit ARM machine architectureEd Maste2014-07-311-0/+1
| | | | Notes: svn path=/head/; revision=269337
* Define SHT_GNU_LIBLIST and R_MIPS_64, which is needed for libelf andKai Wang2014-01-161-0/+2
| | | | | | | libdwarf. Notes: svn path=/projects/elftoolchain/; revision=260793
* Add the definition of DF_1_INTERPOSE flag.Konstantin Belousov2013-10-071-0/+1
| | | | | | | | | | Reviewed by: kan Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (glebius) Notes: svn path=/head/; revision=256100
* Add the ARM processor-specific section types.Kevin Lo2013-07-101-0/+7
| | | | | | | Reviewed by: imp Notes: svn path=/head/; revision=253136
* Add a new set of notes to a process core dump to store procstat data.Mikolaj Golub2013-04-161-0/+9
| | | | | | | | | | | | | | | | | | The notes format is a header of sizeof(int), which stores the size of the corresponding data structure to provide some versioning, and data in the format as it is returned by a related sysctl call. The userland tools (procstat(1)) will be taught to extract this data, providing additional info for postmortem analysis. PR: kern/173723 Suggested by: jhb Discussed with: jhb, kib Reviewed by: jhb (initial version), kib MFC after: 1 month Notes: svn path=/head/; revision=249558
* Add definition for the -z nodefaultlib flag.Konstantin Belousov2012-05-061-0/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=235099
* Add .reginfo section entryOleksandr Tymoshenko2012-03-261-0/+1
| | | | Notes: svn path=/head/; revision=233523
* Add define for MIPS.optionsOleksandr Tymoshenko2012-03-231-0/+1
| | | | Notes: svn path=/head/; revision=233400
* Add ARM relocations types used for thread-local storageOleksandr Tymoshenko2012-02-141-0/+4
| | | | | | | Reviewed by: cognet Notes: svn path=/head/; revision=231617
* Add definition for PT_GNU_RELRO.Konstantin Belousov2012-01-301-0/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=230783
* Fix typo.Konstantin Belousov2012-01-221-1/+1
| | | | | | | | Submitted by: John Marino <draco marino st> MFC after: 3 days Notes: svn path=/head/; revision=230459
* Add definitions for GNU-specific STT_GNU_IFUNC symbol type,Konstantin Belousov2011-12-121-0/+3
| | | | | | | | | and R_{386,X86_64}_IRELATIVE relocations. MFC after: 3 weeks Notes: svn path=/head/; revision=228434
* Add the ability to search for all the inlined instances of a given function.David E. O'Brien2011-05-071-0/+2
| | | | | | | | Reviewed by: jb Obtained from: Juniper Networks Notes: svn path=/head/; revision=221569
* Add PT_GNU_STACK definition.Konstantin Belousov2010-11-231-0/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=215742
* Add the ability for GDB to printout the thread name along with otherAttilio Rao2010-11-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | thread specific informations. In order to do that, and in order to avoid KBI breakage with existing infrastructure the following semantic is implemented: - For live programs, a new member to the PT_LWPINFO is added (pl_tdname) - For cores, a new ELF note is added (NT_THRMISC) that can be used for storing thread specific, miscellaneous, informations. Right now it is just popluated with a thread name. GDB, then, retrieves the correct informations from the corefile via the BFD interface, as it groks the ELF notes and create appropriate pseudo-sections. Sponsored by: Sandvine Incorporated Tested by: gianni Discussed with: dim, kan, kib MFC after: 2 weeks Notes: svn path=/head/; revision=215679
* Add DF_1_LOADFLTR.Konstantin Belousov2010-09-121-0/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=212501
* Fix typo.Konstantin Belousov2010-09-121-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=212499
* Add definitions for powerpc64 ELF relocation types. Some 64-bit relocationsNathan Whitehorn2010-07-101-0/+21
| | | | | | | | are identical to 32-bit relocations in meaning, name, and number, and I have chosen not to duplicate those here. Notes: svn path=/head/; revision=209874
* Implement rtld part of the support for -z nodlopen (see ld(1)).Konstantin Belousov2009-11-261-0/+1
| | | | | | | | Reviewed by: kan MFC after: 3 weeks Notes: svn path=/head/; revision=199829
* Added DT_GNU_HASH entry for GNU-style hash table.Kai Wang2009-04-101-0/+1
| | | | Notes: svn path=/head/; revision=190904
* Implement support for RTLD_NODELETE flag for dlopen() and -z nodeleteKonstantin Belousov2009-03-301-0/+1
| | | | | | | | | | static linker option. Do it by incrementing reference count on the loaded object and its dependencies. Reviewed by: davidxu, kan Notes: svn path=/head/; revision=190543
* Add some definitions for the DT_FLAGS_1 tag flags.Konstantin Belousov2009-03-171-0/+5
| | | | | | | Reviewed by: kan Notes: svn path=/head/; revision=189925
* Introduce a C type representing the header for GNU-style hash tableJoseph Koshy2009-02-031-0/+11
| | | | | | | | | | sections. These ELF sections are generated by newer versions of GNU binutils. Reviewed by: kaiw, Ali Bahrami <ali dot bahrami at sun dot com> Notes: svn path=/head/; revision=188050
* Added section type SHT_GNU_HASH. GNU-style .hash section is a newKai Wang2009-01-031-0/+1
| | | | | | | | style of hash section with better performace than the original SYSV hash. It can be generated by newer binutils. Notes: svn path=/head/; revision=186720
* style(9)David E. O'Brien2009-01-011-315/+315
| | | | | | | Verified with: svn diff -x -Bbw elf_common.h Notes: svn path=/head/; revision=186666