Thread: structure of a compiled binary

  1. #1
    Registered User
    Join Date
    Oct 2004

    structure of a compiled binary

    Hi all,

    I am using a GCC cross-compiler toolchain to compile for an ARM target.

    I am interested in learning about the structure of the compiled binary file. Does anybody have any links to this information, or know what to search for?

    FYI: I am compiling Position Independant Code (PIC) and want to find out how to parse/manipulate the Global Offste Table (GOT) and how to find the addresses of certain functions (or at least the main function) within the code.

    Thanks in advance,

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Lookup the ELF object file format.


  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    $ ld --help | grep map
      -M, --print-map             Print map file on standard output
      -Map FILE                   Write a map file
    Any use?

    Or use the 'nm' utility, or perhaps at a push, you could presuade 'objdump' to do something.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  2. Tutorial review
    By Prelude in forum A Brief History of
    Replies: 11
    Last Post: 03-22-2004, 09:40 PM
  3. binary to decimal
    By miryellis in forum C Programming
    Replies: 7
    Last Post: 03-14-2004, 08:35 PM
  4. Request for comments
    By Prelude in forum A Brief History of
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  5. Structure Within Structure
    By Shakira in forum C Programming
    Replies: 3
    Last Post: 11-04-2003, 03:35 PM