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;
221221
222222pub const DT_NIOS2_GP = 0x70000002;
223223
224/// Program header table entry unused
224225pub const PT_NULL = 0;
226/// Loadable program segment
225227pub const PT_LOAD = 1;
228/// Dynamic linking information
226229pub const PT_DYNAMIC = 2;
230/// Program interpreter
227231pub const PT_INTERP = 3;
232/// Auxiliary information
228233pub const PT_NOTE = 4;
234/// Reserved
229235pub const PT_SHLIB = 5;
236/// Entry for header table itself
230237pub const PT_PHDR = 6;
238/// Thread-local storage segment
231239pub const PT_TLS = 7;
240/// Number of defined types
232241pub const PT_NUM = 8;
242/// Start of OS-specific
233243pub const PT_LOOS = 0x60000000;
244/// GCC .eh_frame_hdr segment
234245pub const PT_GNU_EH_FRAME = 0x6474e550;
246/// Indicates stack executability
235247pub const PT_GNU_STACK = 0x6474e551;
248/// Read-only after relocation
236249pub const PT_GNU_RELRO = 0x6474e552;
237250pub const PT_LOSUNW = 0x6ffffffa;
251/// Sun specific segment
238252pub const PT_SUNWBSS = 0x6ffffffa;
253/// Stack segment
239254pub const PT_SUNWSTACK = 0x6ffffffb;
240255pub const PT_HISUNW = 0x6fffffff;
256/// End of OS-specific
241257pub const PT_HIOS = 0x6fffffff;
258/// Start of processor-specific
242259pub const PT_LOPROC = 0x70000000;
260/// End of processor-specific
243261pub const PT_HIPROC = 0x7fffffff;
244262
263/// Section header table entry unused
245264pub const SHT_NULL = 0;
265/// Program data
246266pub const SHT_PROGBITS = 1;
267/// Symbol table
247268pub const SHT_SYMTAB = 2;
269/// String table
248270pub const SHT_STRTAB = 3;
271/// Relocation entries with addends
249272pub const SHT_RELA = 4;
273/// Symbol hash table
250274pub const SHT_HASH = 5;
275/// Dynamic linking information
251276pub const SHT_DYNAMIC = 6;
277/// Notes
252278pub const SHT_NOTE = 7;
279/// Program space with no data (bss)
253280pub const SHT_NOBITS = 8;
281/// Relocation entries, no addends
254282pub const SHT_REL = 9;
283/// Reserved
255284pub const SHT_SHLIB = 10;
285/// Dynamic linker symbol table
256286pub const SHT_DYNSYM = 11;
287/// Array of constructors
257288pub const SHT_INIT_ARRAY = 14;
289/// Array of destructors
258290pub const SHT_FINI_ARRAY = 15;
291/// Array of pre-constructors
259292pub const SHT_PREINIT_ARRAY = 16;
293/// Section group
260294pub const SHT_GROUP = 17;
295/// Extended section indices
261296pub const SHT_SYMTAB_SHNDX = 18;
297/// Start of OS-specific
262298pub const SHT_LOOS = 0x60000000;
299/// End of OS-specific
263300pub const SHT_HIOS = 0x6fffffff;
301/// Start of processor-specific
264302pub const SHT_LOPROC = 0x70000000;
303/// End of processor-specific
265304pub const SHT_HIPROC = 0x7fffffff;
305/// Start of application-specific
266306pub const SHT_LOUSER = 0x80000000;
307/// End of application-specific
267308pub const SHT_HIUSER = 0xffffffff;
268309
310/// Local symbol
269311pub const STB_LOCAL = 0;
312/// Global symbol
270313pub const STB_GLOBAL = 1;
314/// Weak symbol
271315pub const STB_WEAK = 2;
316/// Number of defined types
272317pub const STB_NUM = 3;
318/// Start of OS-specific
273319pub const STB_LOOS = 10;
320/// Unique symbol
274321pub const STB_GNU_UNIQUE = 10;
322/// End of OS-specific
275323pub const STB_HIOS = 12;
324/// Start of processor-specific
276325pub const STB_LOPROC = 13;
326/// End of processor-specific
277327pub const STB_HIPROC = 15;
278328
279329pub const STB_MIPS_SPLIT_COMMON = 13;
280330
331/// Symbol type is unspecified
281332pub const STT_NOTYPE = 0;
333/// Symbol is a data object
282334pub const STT_OBJECT = 1;
335/// Symbol is a code object
283336pub const STT_FUNC = 2;
337/// Symbol associated with a section
284338pub const STT_SECTION = 3;
339/// Symbol's name is file name
285340pub const STT_FILE = 4;
341/// Symbol is a common data object
286342pub const STT_COMMON = 5;
343/// Symbol is thread-local data object
287344pub const STT_TLS = 6;
345/// Number of defined types
288346pub const STT_NUM = 7;
347/// Start of OS-specific
289348pub const STT_LOOS = 10;
349/// Symbol is indirect code object
290350pub const STT_GNU_IFUNC = 10;
351/// End of OS-specific
291352pub const STT_HIOS = 12;
353/// Start of processor-specific
292354pub const STT_LOPROC = 13;
355/// End of processor-specific
293356pub const STT_HIPROC = 15;
294357
295358pub const STT_SPARC_REGISTER = 13;
......@@ -1630,14 +1693,20 @@ pub const PF_MASKOS = 0x0ff00000;
16301693/// Bits for processor-specific semantics.
16311694pub const PF_MASKPROC = 0xf0000000;
16321695
1633// Special section indexes used in Elf{32,64}_Sym.
1696/// Undefined section
16341697pub const SHN_UNDEF = 0;
1698/// Start of reserved indices
16351699pub const SHN_LORESERVE = 0xff00;
1700/// Start of processor-specific
16361701pub const SHN_LOPROC = 0xff00;
1702/// End of processor-specific
16371703pub const SHN_HIPROC = 0xff1f;
16381704pub const SHN_LIVEPATCH = 0xff20;
1705/// Associated symbol is absolute
16391706pub const SHN_ABS = 0xfff1;
1707/// Associated symbol is common
16401708pub const SHN_COMMON = 0xfff2;
1709/// End of reserved indices
16411710pub const SHN_HIRESERVE = 0xffff;
16421711
16431712/// AMD x86-64 relocations.