Skip to content

Latest commit

 

History

History
74 lines (41 loc) · 1.66 KB

Readme.md

File metadata and controls

74 lines (41 loc) · 1.66 KB

Introduction

This document is for accumulating basic ELF format related definition and commands.

Prepare working environment

  1. Start container

    docker run -it centos:8

  2. Install dependencies

    # for xxd command
    yum install vim-common
    
    yum install gcc
    
    # for better syntax highlight
    yum install vim
    
  3. Build testing program

// File name: main.c
// Build command: gcc ./main.c -o main
#include <stdio.h>

int main() 
{
    printf("Hello World!\n");
    return 0;
}

Commands

  • Display program in hexadecimal: xxd -l 64 ./main

  • List symbol table: readelf --symbols ./main

  • Display ELF header in a more readable way: readelf -h ./main

Refernece

  1. Executable and Linkable Format

  2. Reverse Engineering | ELF File Format | Beginners

  3. Mach-O

    MacOS is using its own object format Mach-O

  4. Understanding the ELF File Format

    This fie described the benefits of standardizing binary file format with ELF format.

  5. In-depth: ELF - The Extensible & Linkable Format

    This video provides a structured introduction of ELF

  6. Application binary interface

    ELF format is first published in the specification for the application binary interface(ABI) of Unix

    application binary interface(ABI)

     > This documents more detailed learning about ABI