ELF Chronicles: Section Headers (2/?)

Intro Assuming you’ve got ELF headers like Elf64_Ehdr or Elf32_Ehdr at your fingertips, and you’re armed with the know-how and tools to decipher their contents effortlessly. For this article I’ll be using the below C code to generate the ELF file. /* file: hello_world.c */ #include <stdio.h> // A macro #define HELLO_MSG1 "Hello World1" // A global variable char HELLO_MSG2[] = "Hello World2"; // main function int main() { // local variable for main char HELLO_MSG3[] = "Hello World3"; // Print messages printf("%s\n", HELLO_MSG1); printf("%s\n", HELLO_MSG2); printf("%s\n", HELLO_MSG3); return 0; } You can get the ELF binary by compiling this code....

October 19, 2023 · 18 min · 3758 words · ayedaemon

ELF Chronicles: ELF file Header (1/?)

Hexdumps In the fascinating world of computers, we’re stuck conversing in binary, a rather dull language of just ones and zeros. But because we mere humans love things to be a tad more exciting and concise, we’ve come up with our own nifty number system - “hexadecimal” or “hex” for short. This system ditches the binary bore and adds a touch of flair with 16 snazzy symbols. It’s got your usual digits from 0 to 9, plus those fancy A to F letters to make data a bit more, well, hexadecimal-chic!...

October 18, 2023 · 11 min · 2175 words · ayedaemon