authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-04-22 15:33:00+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-04-23 13:24:59+02:00
logc3ce04b9e548b0dbf2c286e7c764320620f06bf9
tree3ff2a91e6f7462eb7697262d5eebb136c7fdc844
parent21aa55d34e432b677f71cbb377aa89c8cdbd1483

elf: add missing doc comments to some definitions


1 files changed, 70 insertions(+), 1 deletions(-)

lib/std/elf.zig+70-1
...@@ -221,75 +221,138 @@ pub const DT_IA_64_NUM = 1;...@@ -221,75 +221,138 @@ pub const DT_IA_64_NUM = 1;
221221
222pub const DT_NIOS2_GP = 0x70000002;222pub const DT_NIOS2_GP = 0x70000002;
223223
224/// Program header table entry unused
224pub const PT_NULL = 0;225pub const PT_NULL = 0;
226/// Loadable program segment
225pub const PT_LOAD = 1;227pub const PT_LOAD = 1;
228/// Dynamic linking information
226pub const PT_DYNAMIC = 2;229pub const PT_DYNAMIC = 2;
230/// Program interpreter
227pub const PT_INTERP = 3;231pub const PT_INTERP = 3;
232/// Auxiliary information
228pub const PT_NOTE = 4;233pub const PT_NOTE = 4;
234/// Reserved
229pub const PT_SHLIB = 5;235pub const PT_SHLIB = 5;
236/// Entry for header table itself
230pub const PT_PHDR = 6;237pub const PT_PHDR = 6;
238/// Thread-local storage segment
231pub const PT_TLS = 7;239pub const PT_TLS = 7;
240/// Number of defined types
232pub const PT_NUM = 8;241pub const PT_NUM = 8;
242/// Start of OS-specific
233pub const PT_LOOS = 0x60000000;243pub const PT_LOOS = 0x60000000;
244/// GCC .eh_frame_hdr segment
234pub const PT_GNU_EH_FRAME = 0x6474e550;245pub const PT_GNU_EH_FRAME = 0x6474e550;
246/// Indicates stack executability
235pub const PT_GNU_STACK = 0x6474e551;247pub const PT_GNU_STACK = 0x6474e551;
248/// Read-only after relocation
236pub const PT_GNU_RELRO = 0x6474e552;249pub const PT_GNU_RELRO = 0x6474e552;
237pub const PT_LOSUNW = 0x6ffffffa;250pub const PT_LOSUNW = 0x6ffffffa;
251/// Sun specific segment
238pub const PT_SUNWBSS = 0x6ffffffa;252pub const PT_SUNWBSS = 0x6ffffffa;
253/// Stack segment
239pub const PT_SUNWSTACK = 0x6ffffffb;254pub const PT_SUNWSTACK = 0x6ffffffb;
240pub const PT_HISUNW = 0x6fffffff;255pub const PT_HISUNW = 0x6fffffff;
256/// End of OS-specific
241pub const PT_HIOS = 0x6fffffff;257pub const PT_HIOS = 0x6fffffff;
258/// Start of processor-specific
242pub const PT_LOPROC = 0x70000000;259pub const PT_LOPROC = 0x70000000;
260/// End of processor-specific
243pub const PT_HIPROC = 0x7fffffff;261pub const PT_HIPROC = 0x7fffffff;
244262
263/// Section header table entry unused
245pub const SHT_NULL = 0;264pub const SHT_NULL = 0;
265/// Program data
246pub const SHT_PROGBITS = 1;266pub const SHT_PROGBITS = 1;
267/// Symbol table
247pub const SHT_SYMTAB = 2;268pub const SHT_SYMTAB = 2;
269/// String table
248pub const SHT_STRTAB = 3;270pub const SHT_STRTAB = 3;
271/// Relocation entries with addends
249pub const SHT_RELA = 4;272pub const SHT_RELA = 4;
273/// Symbol hash table
250pub const SHT_HASH = 5;274pub const SHT_HASH = 5;
275/// Dynamic linking information
251pub const SHT_DYNAMIC = 6;276pub const SHT_DYNAMIC = 6;
277/// Notes
252pub const SHT_NOTE = 7;278pub const SHT_NOTE = 7;
279/// Program space with no data (bss)
253pub const SHT_NOBITS = 8;280pub const SHT_NOBITS = 8;
281/// Relocation entries, no addends
254pub const SHT_REL = 9;282pub const SHT_REL = 9;
283/// Reserved
255pub const SHT_SHLIB = 10;284pub const SHT_SHLIB = 10;
285/// Dynamic linker symbol table
256pub const SHT_DYNSYM = 11;286pub const SHT_DYNSYM = 11;
287/// Array of constructors
257pub const SHT_INIT_ARRAY = 14;288pub const SHT_INIT_ARRAY = 14;
289/// Array of destructors
258pub const SHT_FINI_ARRAY = 15;290pub const SHT_FINI_ARRAY = 15;
291/// Array of pre-constructors
259pub const SHT_PREINIT_ARRAY = 16;292pub const SHT_PREINIT_ARRAY = 16;
293/// Section group
260pub const SHT_GROUP = 17;294pub const SHT_GROUP = 17;
295/// Extended section indices
261pub const SHT_SYMTAB_SHNDX = 18;296pub const SHT_SYMTAB_SHNDX = 18;
297/// Start of OS-specific
262pub const SHT_LOOS = 0x60000000;298pub const SHT_LOOS = 0x60000000;
299/// End of OS-specific
263pub const SHT_HIOS = 0x6fffffff;300pub const SHT_HIOS = 0x6fffffff;
301/// Start of processor-specific
264pub const SHT_LOPROC = 0x70000000;302pub const SHT_LOPROC = 0x70000000;
303/// End of processor-specific
265pub const SHT_HIPROC = 0x7fffffff;304pub const SHT_HIPROC = 0x7fffffff;
305/// Start of application-specific
266pub const SHT_LOUSER = 0x80000000;306pub const SHT_LOUSER = 0x80000000;
307/// End of application-specific
267pub const SHT_HIUSER = 0xffffffff;308pub const SHT_HIUSER = 0xffffffff;
268309
310/// Local symbol
269pub const STB_LOCAL = 0;311pub const STB_LOCAL = 0;
312/// Global symbol
270pub const STB_GLOBAL = 1;313pub const STB_GLOBAL = 1;
314/// Weak symbol
271pub const STB_WEAK = 2;315pub const STB_WEAK = 2;
316/// Number of defined types
272pub const STB_NUM = 3;317pub const STB_NUM = 3;
318/// Start of OS-specific
273pub const STB_LOOS = 10;319pub const STB_LOOS = 10;
320/// Unique symbol
274pub const STB_GNU_UNIQUE = 10;321pub const STB_GNU_UNIQUE = 10;
322/// End of OS-specific
275pub const STB_HIOS = 12;323pub const STB_HIOS = 12;
324/// Start of processor-specific
276pub const STB_LOPROC = 13;325pub const STB_LOPROC = 13;
326/// End of processor-specific
277pub const STB_HIPROC = 15;327pub const STB_HIPROC = 15;
278328
279pub const STB_MIPS_SPLIT_COMMON = 13;329pub const STB_MIPS_SPLIT_COMMON = 13;
280330
331/// Symbol type is unspecified
281pub const STT_NOTYPE = 0;332pub const STT_NOTYPE = 0;
333/// Symbol is a data object
282pub const STT_OBJECT = 1;334pub const STT_OBJECT = 1;
335/// Symbol is a code object
283pub const STT_FUNC = 2;336pub const STT_FUNC = 2;
337/// Symbol associated with a section
284pub const STT_SECTION = 3;338pub const STT_SECTION = 3;
339/// Symbol's name is file name
285pub const STT_FILE = 4;340pub const STT_FILE = 4;
341/// Symbol is a common data object
286pub const STT_COMMON = 5;342pub const STT_COMMON = 5;
343/// Symbol is thread-local data object
287pub const STT_TLS = 6;344pub const STT_TLS = 6;
345/// Number of defined types
288pub const STT_NUM = 7;346pub const STT_NUM = 7;
347/// Start of OS-specific
289pub const STT_LOOS = 10;348pub const STT_LOOS = 10;
349/// Symbol is indirect code object
290pub const STT_GNU_IFUNC = 10;350pub const STT_GNU_IFUNC = 10;
351/// End of OS-specific
291pub const STT_HIOS = 12;352pub const STT_HIOS = 12;
353/// Start of processor-specific
292pub const STT_LOPROC = 13;354pub const STT_LOPROC = 13;
355/// End of processor-specific
293pub const STT_HIPROC = 15;356pub const STT_HIPROC = 15;
294357
295pub const STT_SPARC_REGISTER = 13;358pub const STT_SPARC_REGISTER = 13;
...@@ -1630,14 +1693,20 @@ pub const PF_MASKOS = 0x0ff00000;...@@ -1630,14 +1693,20 @@ pub const PF_MASKOS = 0x0ff00000;
1630/// Bits for processor-specific semantics.1693/// Bits for processor-specific semantics.
1631pub const PF_MASKPROC = 0xf0000000;1694pub const PF_MASKPROC = 0xf0000000;
16321695
1633// Special section indexes used in Elf{32,64}_Sym.1696/// Undefined section
1634pub const SHN_UNDEF = 0;1697pub const SHN_UNDEF = 0;
1698/// Start of reserved indices
1635pub const SHN_LORESERVE = 0xff00;1699pub const SHN_LORESERVE = 0xff00;
1700/// Start of processor-specific
1636pub const SHN_LOPROC = 0xff00;1701pub const SHN_LOPROC = 0xff00;
1702/// End of processor-specific
1637pub const SHN_HIPROC = 0xff1f;1703pub const SHN_HIPROC = 0xff1f;
1638pub const SHN_LIVEPATCH = 0xff20;1704pub const SHN_LIVEPATCH = 0xff20;
1705/// Associated symbol is absolute
1639pub const SHN_ABS = 0xfff1;1706pub const SHN_ABS = 0xfff1;
1707/// Associated symbol is common
1640pub const SHN_COMMON = 0xfff2;1708pub const SHN_COMMON = 0xfff2;
1709/// End of reserved indices
1641pub const SHN_HIRESERVE = 0xffff;1710pub const SHN_HIRESERVE = 0xffff;
16421711
1643/// AMD x86-64 relocations.1712/// AMD x86-64 relocations.