info:c_memory_structure
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
info:c_memory_structure [2012/10/15 17:09] – [Goals] moritz | info:c_memory_structure [2012/10/15 17:10] – [The missing piece: .debug_section] moritz | ||
---|---|---|---|
Line 50: | Line 50: | ||
The only program that really knows the structure layout in memory is the compiler. It decides about the in-memory structure. Hence, I started investigating if there was a way to extract this information from the compiler. | The only program that really knows the structure layout in memory is the compiler. It decides about the in-memory structure. Hence, I started investigating if there was a way to extract this information from the compiler. | ||
- | ===== The missing piece: .debug_section | + | ===== The missing piece: .debug_info section |
- | C compilers can store additional information to the compiled output in program sections. For ELF files, there is an optional '' | + | C compilers can store additional information to the compiled output in program sections. For ELF files, there is an optional '' |
For different compilers exist different tools to access the debug section content. For GCC, there is objdump, for IAR there exists ielfdump. Both allow to print the debug section in a human-readable form. However, the structure is not documented and requires the programmer to reverse engineer it. (For GCC it is open-source, | For different compilers exist different tools to access the debug section content. For GCC, there is objdump, for IAR there exists ielfdump. Both allow to print the debug section in a human-readable form. However, the structure is not documented and requires the programmer to reverse engineer it. (For GCC it is open-source, |
info/c_memory_structure.txt · Last modified: 2012/10/16 17:23 by moritz