ELF Hello World Tutorial Section header table Updated 2025-07-16
Array of
Elf64_Shdr structs.Each entry contains metadata about a given section.
e_shoff of the ELF header gives the starting position, 0x40 here.So the table takes bytes from 0x40 to
0x40 + 7 + 0x40 - 1 = 0x1FF.Some section names are reserved for certain section types: www.sco.com/developers/gabi/2003-12-17/ch4.sheader.html#special_sections e.g.
.text requires a SHT_PROGBITS type and SHF_ALLOC + SHF_EXECINSTRRunning:outputs:
readelf -S hello_world.oThere are 7 section headers, starting at offset 0x40:
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .data PROGBITS 0000000000000000 00000200
000000000000000d 0000000000000000 WA 0 0 4
[ 2] .text PROGBITS 0000000000000000 00000210
0000000000000027 0000000000000000 AX 0 0 16
[ 3] .shstrtab STRTAB 0000000000000000 00000240
0000000000000032 0000000000000000 0 0 1
[ 4] .symtab SYMTAB 0000000000000000 00000280
00000000000000a8 0000000000000018 5 6 4
[ 5] .strtab STRTAB 0000000000000000 00000330
0000000000000034 0000000000000000 0 0 1
[ 6] .rela.text RELA 0000000000000000 00000370
0000000000000018 0000000000000018 4 2 4
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), l (large)
I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
O (extra OS processing required) o (OS specific), p (processor specific)The
struct represented by each entry is:typedef struct {
Elf64_Word sh_name;
Elf64_Word sh_type;
Elf64_Xword sh_flags;
Elf64_Addr sh_addr;
Elf64_Off sh_offset;
Elf64_Xword sh_size;
Elf64_Word sh_link;
Elf64_Word sh_info;
Elf64_Xword sh_addralign;
Elf64_Xword sh_entsize;
} Elf64_Shdr; Quartz clock Updated 2025-07-16
Animal-in-the-loop Updated 2025-07-16
Ciro Santilli invented this term, it refers to mechanisms in which you put an animal in a virtual world that the animal can control, and where you can measure the animal's outputs.
- MouseGoggles www.researchsquare.com/article/rs-3301474/v1 | twitter.com/hongyu_chang/status/1704910865583993236
- Fruit fly setup from Penn State: scitechdaily.com/secrets-of-fly-vision-for-rapid-flight-control-and-staggeringly-fast-reaction-speed/
Heavy water Updated 2025-07-16
Cody'sLab had a nice 5 video series on making it at home! But the United States Government asked him to take it down as suggested at Video "What's Been Going On With Cody'sLab? by Cody'sLab (2019)" at youtu.be/x1mv0vwb08Y?t=84.
Here's to the crazy ones Updated 2025-07-16
Because the people who are crazy enough to think they can change the world are the ones who do.
Hyperbolic gemoetry Updated 2025-07-16
ELF Hello World Tutorial Section vs segment Updated 2025-07-16
- section: exists before linking, in object files.Major information sections contain for the linker: is this section:
- segment: exists after linking, in the executable file.Contains information about how each segment should be loaded into memory by the OS, notably location and permissions.
III-V semiconductor Updated 2025-07-16
Most notable example: gallium arsenide, see also: gallium arsenide vs silicon.
An important class of semiconductors, e.g. there is a dedicated III-V lab at: École Polytechnique: www.3-5lab.fr/contactus.php
ELF Hello World Tutorial Specified file formats Updated 2025-07-16
The ELF standard specifies multiple file formats:
- Object files (
.o).Intermediate step to generating executables and other formats:Source code | | Compilation | v Object file | | Linking | v ExecutableObject files exist to make compilation faster: withmake, we only have to recompile the modified source files based on timestamps.
- Executable files (no standard Linux extension).This is what the Linux kernel can actually run.
- Archive files (
.a).Libraries meant to be embedded into executables during the Linking step.
- Shared object files (
.so).Libraries meant to be loaded when the executable starts running.
- Core dumps.Such files may be generated by the Linux kernel when the program does naughty things, e.g. segfault.They exist to help debugging the program.
In this tutorial, we consider only object and executable files.
ELF Hello World Tutorial Standards Updated 2025-07-16
ELF is specified by the LSB:
The LSB basically links to other standards with minor extensions, in particular:
- Generic (both by SCO):
- System V ABI 4.1 (1997) www.sco.com/developers/devspecs/gabi41.pdf, no 64 bit, although a magic number is reserved for it. Same for core files. This is the first document you should look at when searching for information.
- System V ABI Update DRAFT 17 (2003) www.sco.com/developers/gabi/2003-12-17/contents.html, adds 64 bit. Only updates chapters 4 and 5 of the previous document: the others remain valid and are still referenced.
- Architecture specific (by the processor vendor):
A handy summary can be found at:
man elf ELF Hello World Tutorial
STT_FILE Updated 2025-07-16- 10 8:
st_name=01000000= character 1 in the.strtab, which until the following\0makeshello_world.asmThis piece of information file may be used by the linker to decide on which segment sections go: e.g. inldlinker script we write:segment_name : { file(section) }segment_name : { *(section) } - 10 13:
st_shndx= Symbol Table Section header Index =f1ff=SHN_ABS. Required forSTT_FILE. - 20 0:
st_value= 8x00: required for value forSTT_FILE - 20 8:
st_size= 8x00: no allocated size
Now from the
readelf, we interpret the others quickly. Important mathematical group Updated 2025-07-16
Janko group Updated 2025-07-16
Mathematics website Updated 2025-07-16
Mathieu group Updated 2025-07-16
Probability current Updated 2025-07-16
Readout (quantum computing) Updated 2025-07-16
Eli Benderski Updated 2025-07-16
Homepage: eli.thegreenplace.net/
Also has many great contributions on Stack Overflow: stackoverflow.com/users/8206/eli-bendersky
As of 2016, Eli worked at Google (reference). TODO before that, I had found his earlier info previously but lost it.
Eli focuses mostly on compiler toolchains.
He also has some mathematics stuff, so cute: eli.thegreenplace.net/2015/change-of-basis-in-linear-algebra/
Eliezer Yudkowsky Updated 2025-07-16
Unlisted articles are being shown, click here to show only listed articles.