elf.5 (79538) | elf.5 (79727) |
---|---|
1.\"Copyright (c) 1999 Jeroen Ruigrok van der Werven 2.\"All rights reserved. 3.\" 4.\"Redistribution and use in source and binary forms, with or without 5.\"modification, are permitted provided that the following conditions 6.\"are met: 7.\"1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17.\"FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\"DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\"OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\"HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\"LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\"OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\"SUCH DAMAGE. 24.\" | 1.\"Copyright (c) 1999 Jeroen Ruigrok van der Werven 2.\"All rights reserved. 3.\" 4.\"Redistribution and use in source and binary forms, with or without 5.\"modification, are permitted provided that the following conditions 6.\"are met: 7.\"1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 17.\"FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18.\"DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19.\"OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20.\"HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21.\"LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22.\"OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23.\"SUCH DAMAGE. 24.\" |
25.\" $FreeBSD: head/share/man/man5/elf.5 79538 2001-07-10 15:31:11Z ru $ | 25.\" $FreeBSD: head/share/man/man5/elf.5 79727 2001-07-14 19:41:16Z schweikh $ |
26.\" 27.Dd July 31, 1999 28.Dt ELF 5 29.Os 30.Sh NAME 31.Nm elf 32.Nd format of ELF executable binary files 33.Sh SYNOPSIS --- 667 unchanged lines hidden (view full) --- 701have an associated section. 702Other members of the section header 703have undefined values. 704.It Dv SHT_PROGBITS 705The section holds information defined by the program, whose 706format and meaning are determined solely by the program. 707.It Dv SHT_SYMTAB 708This section holds a symbol table. | 26.\" 27.Dd July 31, 1999 28.Dt ELF 5 29.Os 30.Sh NAME 31.Nm elf 32.Nd format of ELF executable binary files 33.Sh SYNOPSIS --- 667 unchanged lines hidden (view full) --- 701have an associated section. 702Other members of the section header 703have undefined values. 704.It Dv SHT_PROGBITS 705The section holds information defined by the program, whose 706format and meaning are determined solely by the program. 707.It Dv SHT_SYMTAB 708This section holds a symbol table. |
709Typically, | 709Typically, |
710.Sy SHT_SYMTAB 711provides symbols for link editing, though it may also be used 712for dynamic linking. 713As a complete symbol table, it may contain 714many symbols unnecessary for dynamic linking. 715An object file can 716also contain a 717.Sy SHN_DYNSYM --- 275 unchanged lines hidden (view full) --- 993.It .relNAME 994This section holds relocation information as described below. 995If the file 996has a loadable segment that includes relocation, the section's attributes 997will include the 998.Sy SHF_ALLOC 999bit. 1000Otherwise the bit will be off. | 710.Sy SHT_SYMTAB 711provides symbols for link editing, though it may also be used 712for dynamic linking. 713As a complete symbol table, it may contain 714many symbols unnecessary for dynamic linking. 715An object file can 716also contain a 717.Sy SHN_DYNSYM --- 275 unchanged lines hidden (view full) --- 993.It .relNAME 994This section holds relocation information as described below. 995If the file 996has a loadable segment that includes relocation, the section's attributes 997will include the 998.Sy SHF_ALLOC 999bit. 1000Otherwise the bit will be off. |
1001By convention, | 1001By convention, |
1002.Dq NAME 1003is supplied by the section to which the relocations apply. 1004Thus a relocation 1005section for 1006.Sy .text 1007normally would have the name 1008.Sy .rel.text . 1009This section is of type --- 5 unchanged lines hidden (view full) --- 1015will include the 1016.Sy SHF_ALLOC 1017bit. 1018Otherwise the bit will be off. 1019By convention, 1020.Dq NAME 1021is supplied by the section to which the relocations apply. 1022Thus a relocation | 1002.Dq NAME 1003is supplied by the section to which the relocations apply. 1004Thus a relocation 1005section for 1006.Sy .text 1007normally would have the name 1008.Sy .rel.text . 1009This section is of type --- 5 unchanged lines hidden (view full) --- 1015will include the 1016.Sy SHF_ALLOC 1017bit. 1018Otherwise the bit will be off. 1019By convention, 1020.Dq NAME 1021is supplied by the section to which the relocations apply. 1022Thus a relocation |
1023section for | 1023section for |
1024.Sy .text 1025normally would have the name 1026.Sy .rela.text . 1027This section is of type 1028.Sy SHT_RELA . 1029.It .rodata 1030This section holds read-only data that typically contributes to a 1031non-writable segment in the process image. 1032This section is of type 1033.Sy SHT_PROGBITS . 1034The attribute used is 1035.Sy SHF_ALLOC . 1036.It .rodata1 | 1024.Sy .text 1025normally would have the name 1026.Sy .rela.text . 1027This section is of type 1028.Sy SHT_RELA . 1029.It .rodata 1030This section holds read-only data that typically contributes to a 1031non-writable segment in the process image. 1032This section is of type 1033.Sy SHT_PROGBITS . 1034The attribute used is 1035.Sy SHF_ALLOC . 1036.It .rodata1 |
1037This section hold read-only data that typically contributes to a | 1037This section hold read-only data that typically contributes to a |
1038non-writable segment in the process image. 1039This section is of type 1040.Sy SHT_PROGBITS . 1041The attribute used is 1042.Sy SHF_ALLOC . 1043.It .shstrtab 1044This section holds section names. 1045This section is of type --- 174 unchanged lines hidden (view full) --- 1220.Dq defined 1221in relation to some action. 1222This member holds the relevant section 1223header table index. 1224.El 1225.Pp 1226Relocation is the process of connecting symbolic references with 1227symbolic definitions. | 1038non-writable segment in the process image. 1039This section is of type 1040.Sy SHT_PROGBITS . 1041The attribute used is 1042.Sy SHF_ALLOC . 1043.It .shstrtab 1044This section holds section names. 1045This section is of type --- 174 unchanged lines hidden (view full) --- 1220.Dq defined 1221in relation to some action. 1222This member holds the relevant section 1223header table index. 1224.El 1225.Pp 1226Relocation is the process of connecting symbolic references with 1227symbolic definitions. |
1228Relocatable files must have information that | 1228Relocatable files must have information that |
1229describes how to modify their section contents, thus allowing executable 1230and shared object files to hold the right information for a process' 1231program image. 1232Relocation entries are these data. 1233.Pp 1234Relocation structures that do not need an addend: 1235.Pp 1236.Bd -literal -offset indent --- 68 unchanged lines hidden (view full) --- 1305.%B System V Application Binary Interface 1306.Re 1307.Rs 1308.%A Unix System Laboratories 1309.%T Object Files 1310.%B "Executable and Linking Format (ELF)" 1311.Re 1312.Sh HISTORY | 1229describes how to modify their section contents, thus allowing executable 1230and shared object files to hold the right information for a process' 1231program image. 1232Relocation entries are these data. 1233.Pp 1234Relocation structures that do not need an addend: 1235.Pp 1236.Bd -literal -offset indent --- 68 unchanged lines hidden (view full) --- 1305.%B System V Application Binary Interface 1306.Re 1307.Rs 1308.%A Unix System Laboratories 1309.%T Object Files 1310.%B "Executable and Linking Format (ELF)" 1311.Re 1312.Sh HISTORY |
1313The ELF header files made their appearance in | 1313The ELF header files made their appearance in |
1314.Fx 2.2.6 . 1315ELF in itself first appeared in 1316.At V . 1317The ELF format is an adopted standard. 1318.Sh AUTHORS | 1314.Fx 2.2.6 . 1315ELF in itself first appeared in 1316.At V . 1317The ELF format is an adopted standard. 1318.Sh AUTHORS |
1319This manual page was written by | 1319This manual page was written by |
1320.An Jeroen Ruigrok van der Werven 1321.Aq asmodai@FreeBSD.org 1322with inspiration from BSDi's BSD/OS 1323.Xr elf 5 1324manpage. | 1320.An Jeroen Ruigrok van der Werven 1321.Aq asmodai@FreeBSD.org 1322with inspiration from BSDi's BSD/OS 1323.Xr elf 5 1324manpage. |