École Polytechnique internal student wiki Updated +Created
wikix.binets.fr runs an internal MediaWiki instance available to all logged in alumni.
ELF Hello World Tutorial / Specified file formats Updated +Created
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: with make, we only have to recompile the modified source files based on timestamps.
    We have to do the linking step every time, but it is much less expensive.
  • Executable files (no standard Linux extension).
    This is what the Linux kernel can actually run.
  • 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.
GPU compute library Updated +Created
Infrared Updated +Created
Lindsay Mills Updated +Created
Video 1.
Snowden Opens Up About His Girlfriend
. Source. TODO interviewed by.
Video 2.
"Citizenfour" winning Best Documentary Feature by Oscars (2014)
Source. Lindsay attended.
Radio wave Updated +Created
This is likely the easiest one to produce as the frequencies are lower, which is why it was discovered first. TODO original setup.
Also because it is transparent to brick and glass, (though not metal) it becomes good for telecommunication.
Some notable subranges:
Regression Games Updated +Created
Ultraviolet Updated +Created
University of Oxford spinout company Updated +Created
Visible spectrum Updated +Created
420 to 680 nm for sure, but larger ranges are observable in laboratory conditions.
Anomalous magnetic dipole moment Updated +Created
Battlecode Updated +Created
Some mechanics:
  • inter agent communication
  • compute power is limited by limiting Java bytecode count execution per bot per cycle
Video 1.
Battlecode Final Tournament 2023
. Source.
Video 2.
Introduction to Battlecode by MIT OpenCourseWare (2014)
Source.
Computer Olympiad Updated +Created
Ah, shame, they are a bit weak.
Davisson-Germer experiment Updated +Created
Euclid's formula generates all Pythagorean triples Updated +Created
Gospel of Matthew Updated +Created
The first chapter of the New Testament.
There are infinitely many Pythagorean triples Updated +Created
Direct consequence of Euclid's formula.
ELF Hello World Tutorial / Dynamic linking sections Updated +Created
This program did not have certain dynamic linking related sections because we linked it minimally with ld.
However, if you compile a C hello world with GCC 8.2:
gcc -o main.out main.c
some other interesting sections would appear.
ELF Hello World Tutorial / .rela.text Updated +Created
Section type: sh_type == SHT_RELA.
Common name: "relocation section".
.rela.text holds relocation data which says how the address should be modified when the final executable is linked. This points to bytes of the text area that must be modified when linking happens to point to the correct memory locations.
Basically, it translates the object text containing the placeholder 0x0 address:
   a:       48 be 00 00 00 00 00    movabs $0x0,%rsi
  11:       00 00 00
to the actual executable code containing the final 0x6000d8:
4000ba: 48 be d8 00 60 00 00    movabs $0x6000d8,%rsi
4000c1: 00 00 00
It was pointed to by sh_info = 6 of the .symtab section.
readelf -r hello_world.o outputs:
Relocation section '.rela.text' at offset 0x3b0 contains 1 entries:
  Offset          Info           Type           Sym. Value    Sym. Name + Addend
00000000000c  000200000001 R_X86_64_64       0000000000000000 .data + 0
The section does not exist in the executable.
The actual bytes are:
00000370  0c 00 00 00 00 00 00 00  01 00 00 00 02 00 00 00  |................|
00000380  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
The struct represented is:
typedef struct {
    Elf64_Addr  r_offset;
    Elf64_Xword r_info;
    Elf64_Sxword    r_addend;
} Elf64_Rela;
So:
  • 370 0: r_offset = 0xC: address into the .text whose address this relocation will modify
  • 370 8: r_info = 0x200000001. Contains 2 fields:
    • ELF64_R_TYPE = 0x1: meaning depends on the exact architecture.
    • ELF64_R_SYM = 0x2: index of the section to which the address points, so .data which is at index 2.
    The AMD64 ABI says that type 1 is called R_X86_64_64 and that it represents the operation S + A where:
    • S: the value of the symbol on the object file, here 0 because we point to the 00 00 00 00 00 00 00 00 of movabs $0x0,%rsi
    • A: the addend, present in field r_added
    This address is added to the section on which the relocation operates.
    This relocation operation acts on a total 8 bytes.
  • 380 0: r_addend = 0
So in our example we conclude that the new address will be: S + A = .data + 0, and thus the first thing in the data section.

Unlisted articles are being shown, click here to show only listed articles.