Join two images side-by-side Updated 2025-07-16
Join two SVG side-by-side from the command line Updated 2025-07-16
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_EXECINSTR
Running:outputs:
readelf -S hello_world.o
There 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;
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.
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 Executable
Object 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\0
makeshello_world.asm
This piece of information file may be used by the linker to decide on which segment sections go: e.g. inld
linker 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. ELF Hello World Tutorial
.symtab
Updated 2025-07-16Section type:
sh_type == SHT_SYMTAB
.A good high level tool to disassemble that section is:which gives:
nm hello_world.o
0000000000000000 T _start
0000000000000000 d hello_world
000000000000000d a hello_world_len
This is however a high level view that omits some types of symbols and in which the symbol types . A more detailed disassembly can be obtained with:which gives:
readelf -s hello_world.o
Symbol table '.symtab' contains 7 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 FILE LOCAL DEFAULT ABS hello_world.asm
2: 0000000000000000 0 SECTION LOCAL DEFAULT 1
3: 0000000000000000 0 SECTION LOCAL DEFAULT 2
4: 0000000000000000 0 NOTYPE LOCAL DEFAULT 1 hello_world
5: 000000000000000d 0 NOTYPE LOCAL DEFAULT ABS hello_world_len
6: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 2 _start
The binary format of the table is documented at www.sco.com/developers/gabi/2003-12-17/ch4.symtab.html
The data is:which gives:
readelf -x .symtab hello_world.o
Hex dump of section '.symtab':
0x00000000 00000000 00000000 00000000 00000000 ................
0x00000010 00000000 00000000 01000000 0400f1ff ................
0x00000020 00000000 00000000 00000000 00000000 ................
0x00000030 00000000 03000100 00000000 00000000 ................
0x00000040 00000000 00000000 00000000 03000200 ................
0x00000050 00000000 00000000 00000000 00000000 ................
0x00000060 11000000 00000100 00000000 00000000 ................
0x00000070 00000000 00000000 1d000000 0000f1ff ................
0x00000080 0d000000 00000000 00000000 00000000 ................
0x00000090 2d000000 10000200 00000000 00000000 -...............
0x000000a0 00000000 00000000 ........
The entries are of type:
typedef struct {
Elf64_Word st_name;
unsigned char st_info;
unsigned char st_other;
Elf64_Half st_shndx;
Elf64_Addr st_value;
Elf64_Xword st_size;
} Elf64_Sym;
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/
Eligius pool Updated 2025-07-16
Created by Luke Dashjr.
The pool is named after Saint Eligius, patron of miners[ref]
Eligius also means to "choose" or "chosen" in Latin: en.wiktionary.org/wiki/Eligius, same root as "to elect" in modern English presumably.
Saint Eligius by Petrus Christus
. Source. Eligius pool is named after Saint Eligius, patron of goldsmiths and miners[ref] Elis Regina Updated 2025-07-16
Mostly interpreter of songs written by others. But she's just too amazing, many of her interpretations are better than the original.
God, even Ciro Santilli is slightly shocked by her death, which happened before he was born, can you imagine it at the time? She was MPB's golden girl...
Atrás da Porta performed by Elis Regina
. Source. Composed by Francis Hime and Chico Buarque.Águas de março performed by Elis Regina
. Source. From the 1972 eponymous album. Composed by Antônio Carlos Jobim. Elliptic-curve Diffie-Hellman Updated 2025-07-16
The algorithm is completely analogous to Diffie-Hellman key exchange in that you efficiently raise a number to a power times and send the result over while keeping as private key.
The only difference is that a different group is used: instead of using the cyclic group, we use the elliptic curve group of an elliptic curve over a finite field.
Elliptic curves by Computerphile (2018)
Source. youtu.be/NF1pwjL9-DE?t=143 shows the continuous group well, but then fails to explain the discrete part.Variant of Diffie-Hellman key exchange based on elliptic curve cryptography.
Josephson effect Updated 2025-07-16
Discrete quantum effect observed in superconductors with a small insulating layer, a device known as a Josephson junction.
To understand the behaviour effect, it is important to look at the Josephson equations consider the following Josephson effect regimes separately:
Bibliography:
- www.youtube.com/watch?v=cnZ6exn2CkE "Superconductivity: Professor Brian Josephson". Several random excerpts from Cambridge people talking about the Josephson effect
Josephson equations Updated 2025-07-16
Two equations derived from first principles by Brian Josephson that characterize the device, somewhat like an I-V curve:where:
- : Josephson current
- : the Josephson phase, a function defined by the second equation plus initial conditions
- : input voltage of the system
- : current across the junction, determined by the input voltage
Note how these equations are not a typical I-V curve, as they are not an instantaneous dependency between voltage and current: the history of the voltage matters! Or in other words, the system has an internal state, represented by the Josephson phase at a given point in time.
To understand them better, it is important to look at some important cases separately:
- AC Josephson effect: V is a fixed DC voltage
Elliptic curve point addition Updated 2025-07-16
Elliptic curve point addition is the group operation of an elliptic curve group, i.e. it is a function that takes two points of an elliptic curve as input, and returns a third point of the elliptic curve as its output, while obeying the group axioms.
The operation is defined e.g. at en.wikipedia.org/w/index.php?title=Elliptic_curve_point_multiplication&oldid=1168754060#Point_operations. For example, consider the most common case for two different points different. If the two points are given in coordinates:then the addition is defined in the general case as:with some slightly different definitions for point doubling and the identity point.
This definition relies only on operations that we know how to do on arbitrary fields:and it therefore works for elliptic curves defined over any field.
Just remember that:means:and that always exists because it is the inverse element, which is guaranteed to exist for multiplication due to the group axioms it obeys.
The group function is usually called elliptic curve point addition, and repeated addition as done for DHKE is called elliptic curve point multiplication.
Elon Musk Updated 2025-07-16
Respect on the technical side by Ciro Santilli.
But the way he treated his first wife Justine Musk, is very very weird, incomprehensible: www.marieclaire.com/sex-love/a5380/millionaire-starter-wife/
Positive Cirocoins for possibly going to reverse Twitter's unfair Trump ban if his Twitter acquisition goes through:
Engine Updated 2025-07-16
Enthalpy Updated 2025-07-16
Adds up chemical energy and kinetic energy.
The sum is of interest when thinking about reactions because chemical reactions can change the number of molecules involved, and therefore the pressure.
To predict if a reaction is spontaneous or not, negative enthalpy is not enough, we must also consider entropy via Gibbs free energy.
enwiki-latest-categorylinks.sql Updated 2025-07-16
The schema is listed at: www.mediawiki.org/wiki/Manual:Categorylinks_table
On the SQL:
CREATE TABLE `categorylinks` (
`cl_from` int(8) unsigned NOT NULL DEFAULT 0,
`cl_to` varbinary(255) NOT NULL DEFAULT '',
`cl_sortkey` varbinary(230) NOT NULL DEFAULT '',
`cl_timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`cl_sortkey_prefix` varbinary(255) NOT NULL DEFAULT '',
`cl_collation` varbinary(32) NOT NULL DEFAULT '',
`cl_type` enum('page','subcat','file') NOT NULL DEFAULT 'page',
PRIMARY KEY (`cl_from`,`cl_to`),
KEY `cl_timestamp` (`cl_to`,`cl_timestamp`),
KEY `cl_sortkey` (`cl_to`,`cl_type`,`cl_sortkey`,`cl_from`),
KEY `cl_collation_ext` (`cl_collation`,`cl_to`,`cl_type`,`cl_from`)
) ENGINE=InnoDB DEFAULT CHARSET=binary ROW_FORMAT=COMPRESSED;
The format appears to be described at: www.mediawiki.org/wiki/Manual:Categorylinks_table
A sample INSERT entry is:
(3,'Computer_storage_devices',88,11,0)
enwiki-latest-category.sql Updated 2025-07-16
dumps.wikimedia.org/enwiki/latest/enwiki-latest-category.sql.gz contains a list of categories. It only contains the categories and some counts, but it doesn't contain the subcategories and pages under each category, so it is a bit pointless.
The schema is listed at: www.mediawiki.org/wiki/Manual:Category_table
The SQL first defines the table:followed by a few humongous inserts:which we can see at: en.wikipedia.org/wiki/Category:Computer_storage_devices
CREATE TABLE `category` (
`cat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`cat_title` varbinary(255) NOT NULL DEFAULT '',
`cat_pages` int(11) NOT NULL DEFAULT 0,
`cat_subcats` int(11) NOT NULL DEFAULT 0,
`cat_files` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`cat_id`),
UNIQUE KEY `cat_title` (`cat_title`),
KEY `cat_pages` (`cat_pages`)
) ENGINE=InnoDB AUTO_INCREMENT=249228235 DEFAULT CHARSET=binary ROW_FORMAT=COMPRESSED;
INSERT INTO `category` VALUES (2,'Unprintworthy_redirects',1597224,20,0),(3,'Computer_storage_devices',88,11,0)
Se see that en.wikipedia.org/wiki/Category:Computer_storage_devices_by_companyso it contains only categories.
- en.wikipedia.org/wiki/Category:Computer_storage_devices is a subcategory of that category and it appears in that file.
- en.wikipedia.org/wiki/Acronis_Secure_Zone is a page of the category, and it does not appear
We can check this with:and it shows:There doesn't seem to be any interlink between the categories, only page and subcategory counts therefore.
sed -s 's/),/\n/g' enwiki-latest-category.sql | grep Computer_storage_devices
(3,'Computer_storage_devices',88,11,0
(521773,'Computer_storage_devices_by_company',6,6,0
Unlisted articles are being shown, click here to show only listed articles.