blob: ef61b6691cb88f75c1bfdd8bae41fd9966330640 [file] [log] [blame]
# File test.c, compiled with flags "-O0 -g"
# Source code:
#
# int foo = 0;
#
# int func() {
# foo = 1234;
# return foo;
# }
#
# int main() {
# return func();
# }
#
--- !ELF
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
OSABI: ELFOSABI_STANDALONE
Type: ET_EXEC
Machine: EM_MSP430
Flags: [ ]
Entry: 0x500
ProgramHeaders:
- Type: PT_LOAD
Flags: [ PF_X, PF_R ]
FirstSec: .text
LastSec: .bss
VAddr: 0x46C
Align: 0x4
- Type: PT_LOAD
Flags: [ PF_W, PF_R ]
FirstSec: .data
LastSec: .bss
VAddr: 0x53C
Align: 0x4
- Type: PT_LOAD
Flags: [ PF_R ]
FirstSec: __interrupt_vector_31
LastSec: __interrupt_vector_31
VAddr: 0xFFFE
Align: 0x4
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Address: 0x500
AddressAlign: 0x4
Content: 3140C0FF0C43B0121C05B01281010000B240D2043C051C423C0530413180020081430000B01210053150020030411C4330413C402A0030410C433041
- Name: .data
Type: SHT_PROGBITS
Flags: [ SHF_WRITE, SHF_ALLOC ]
Address: 0x53C
AddressAlign: 0x1
- Name: .bss
Type: SHT_NOBITS
Flags: [ SHF_WRITE, SHF_ALLOC ]
Address: 0x53C
AddressAlign: 0x2
Size: 0x2
- Name: __interrupt_vector_31
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
Address: 0xFFFE
AddressAlign: 0x1
Offset: 0xD2
Content: '0005'
- Name: .rodata
Type: SHT_PROGBITS
Flags: [ SHF_WRITE, SHF_ALLOC ]
Address: 0x500
AddressAlign: 0x1
- Name: .rodata2
Type: SHT_PROGBITS
Flags: [ SHF_WRITE ]
Address: 0x500
AddressAlign: 0x1
- Name: .noinit
Type: SHT_PROGBITS
Flags: [ SHF_WRITE ]
Address: 0x53E
AddressAlign: 0x1
- Name: .persistent
Type: SHT_PROGBITS
Flags: [ SHF_WRITE ]
Address: 0x53E
AddressAlign: 0x1
- Name: .MSP430.attributes
Type: SHT_MSP430_ATTRIBUTES
AddressAlign: 0x1
Content: 41160000006D737061626900010B000000040106010801
- Name: .comment
Type: SHT_PROGBITS
Flags: [ SHF_MERGE, SHF_STRINGS ]
AddressAlign: 0x1
EntSize: 0x1
Content: 4743433A20284D6974746F2053797374656D73204C696D69746564202D206D73703433302D67636320392E332E312E31312920392E332E3100636C616E672076657273696F6E2031362E302E30202868747470733A2F2F6769746875622E636F6D2F6163636573732D736F6674656B2F6C6C766D2D70726F6A6563742E67697420373634363331663864643330353231386339613938656165373535353464303436303236343032322900
- Name: .debug_info
Type: SHT_PROGBITS
AddressAlign: 0x1
Content: 4D000000050001040000000001001D0001080000000000000002011E0000000800000002032E000000000202A1000304050204010C00000001510500042E00000004021200000001510600092E00000000
- Name: .debug_abbrev
Type: SHT_PROGBITS
AddressAlign: 0x1
Content: 011101252513050325721710171B25111B120673170000023400032549133F193A0B3B0B0218000003240003253E0B0B0B0000042E00111B1206401803253A0B3B0B49133F19000000
- Name: .debug_line
Type: SHT_PROGBITS
AddressAlign: 0x1
Content: 660000000500040037000000010101FB0E0D00010101010000000100000101011F010000000003011F020F051E011E000000002C97BF5F43C79BB948A69660B684FF4A0400000502100500001505060A130509670502064A0500063105090A830502060B4A0206000101
- Name: .debug_frame
Type: SHT_PROGBITS
AddressAlign: 0x4
Content: 10000000FFFFFFFF04000400017E000C010280010C00000000000000100500000C00000014000000000000001C05000012000000440E044C0E020000
- Name: .debug_str_offsets
Type: SHT_PROGBITS
AddressAlign: 0x1
Content: 2000000005000000000000007200000079000000970000009B0000009F000000A4000000
- Name: .debug_line_str
Type: SHT_PROGBITS
Flags: [ SHF_MERGE, SHF_STRINGS ]
AddressAlign: 0x1
EntSize: 0x1
Content: 2F686F6D652F757365722F6465762F746573742F6D737034333000746573742E6300
- Type: SectionHeaderTable
Sections:
- Name: __interrupt_vector_31
- Name: .rodata
- Name: .rodata2
- Name: .text
- Name: .data
- Name: .bss
- Name: .noinit
- Name: .persistent
- Name: .MSP430.attributes
- Name: .comment
- Name: .debug_info
- Name: .debug_abbrev
- Name: .debug_line
- Name: .debug_frame
- Name: .debug_str
- Name: .debug_str_offsets
- Name: .debug_addr
- Name: .debug_line_str
- Name: .symtab
- Name: .strtab
- Name: .shstrtab
Symbols:
- Name: __interrupt_vector_31
Type: STT_SECTION
Section: __interrupt_vector_31
Value: 0xFFFE
- Name: .rodata
Type: STT_SECTION
Section: .rodata
Value: 0x500
- Name: .rodata2
Type: STT_SECTION
Section: .rodata2
Value: 0x500
- Name: .text
Type: STT_SECTION
Section: .text
Value: 0x500
- Name: .data
Type: STT_SECTION
Section: .data
Value: 0x53C
- Name: .bss
Type: STT_SECTION
Section: .bss
Value: 0x53C
- Name: .noinit
Type: STT_SECTION
Section: .noinit
Value: 0x53E
- Name: .persistent
Type: STT_SECTION
Section: .persistent
Value: 0x53E
- Name: .MSP430.attributes
Type: STT_SECTION
Section: .MSP430.attributes
- Name: .comment
Type: STT_SECTION
Section: .comment
- Name: .debug_info
Type: STT_SECTION
Section: .debug_info
- Name: .debug_abbrev
Type: STT_SECTION
Section: .debug_abbrev
- Name: .debug_line
Type: STT_SECTION
Section: .debug_line
- Name: .debug_frame
Type: STT_SECTION
Section: .debug_frame
- Name: .debug_str
Type: STT_SECTION
Section: .debug_str
- Name: .debug_str_offsets
Type: STT_SECTION
Section: .debug_str_offsets
- Name: .debug_addr
Type: STT_SECTION
Section: .debug_addr
- Name: .debug_line_str
Type: STT_SECTION
Section: .debug_line_str
- Name: __msp430_resetvec_hook
Section: __interrupt_vector_31
Value: 0xFFFE
- Name: .Loc.58.1
Section: .text
Value: 0x500
- Name: "L0\x01"
Section: .text
Value: 0x504
- Name: "L0\x01 (1)"
Section: .text
Value: 0x500
- Name: "L0\x01 (2)"
Section: .text
Value: 0x504
- Name: crt_main.o
Type: STT_FILE
Index: SHN_ABS
- Name: .Loc.253.1
Section: .text
Value: 0x504
- Name: .Loc.254.1
Section: .text
Value: 0x506
- Name: "L0\x01 (3)"
Section: .text
Value: 0x50A
- Name: "L0\x01 (4)"
Section: .text
Value: 0x504
- Name: "L0\x01 (5)"
Section: .text
Value: 0x50A
- Name: crt_callexit.o
Type: STT_FILE
Index: SHN_ABS
- Name: .Loc.267.1
Section: .text
Value: 0x50A
- Name: "L0\x01 (6)"
Section: .text
Value: 0x50E
- Name: "L0\x01 (7)"
Section: .text
Value: 0x50A
- Name: "L0\x01 (8)"
Section: .text
Value: 0x50E
- Name: test.c
Type: STT_FILE
Index: SHN_ABS
- Name: syscalls.o
Type: STT_FILE
Index: SHN_ABS
- Name: .Loc.59.1
Section: .text
Value: 0x52E
- Name: .Loc.60.1
Section: .text
Value: 0x530
- Name: .Loc.65.1
Section: .text
Value: 0x532
- Name: .Loc.66.1
Section: .text
Value: 0x536
- Name: .Loc.71.1
Section: .text
Value: 0x538
- Name: .Loc.72.1
Section: .text
Value: 0x53A
- Name: "L0\x01 (9)"
Section: .text
Value: 0x53C
- Name: "L0\x01 (10)"
Section: .text
Value: 0x52E
- Name: "L0\x01 (11)"
Section: .text
Value: 0x53C
- Name: __crt0_call_exit
Type: STT_FUNC
Section: .text
Binding: STB_GLOBAL
Value: 0x50A
Size: 0x4
- Name: getpid
Section: .text
Binding: STB_WEAK
Value: 0x532
- Name: isatty
Section: .text
Binding: STB_WEAK
Value: 0x52E
- Name: __crt0_start
Type: STT_FUNC
Section: .text
Binding: STB_GLOBAL
Value: 0x500
Size: 0x4
- Name: lseek
Index: SHN_ABS
Binding: STB_WEAK
Value: 0x186
- Name: _isatty
Section: .text
Binding: STB_WEAK
Value: 0x52E
- Name: fstat
Index: SHN_ABS
Binding: STB_WEAK
Value: 0x18A
- Name: kill
Index: SHN_ABS
Binding: STB_WEAK
Value: 0x189
- Name: _start
Section: .text
Binding: STB_GLOBAL
Value: 0x500
- Name: read
Index: SHN_ABS
Binding: STB_WEAK
Value: 0x184
- Name: __rom_highdatacopysize
Index: SHN_ABS
Binding: STB_WEAK
- Name: gettimeofday
Section: .text
Binding: STB_WEAK
Value: 0x538
Size: 0x4
- Name: main
Type: STT_FUNC
Section: .text
Binding: STB_GLOBAL
Value: 0x51C
Size: 0x12
- Name: __high_bsssize
Index: SHN_ABS
Binding: STB_WEAK
- Name: __rom_highdatastart
Index: SHN_ABS
Binding: STB_WEAK
- Name: __high_datastart
Index: SHN_ABS
Binding: STB_WEAK
- Name: __upper_data_init
Index: SHN_ABS
Binding: STB_WEAK
- Name: func
Type: STT_FUNC
Section: .text
Binding: STB_GLOBAL
Value: 0x510
Size: 0xC
- Name: foo
Type: STT_OBJECT
Section: .bss
Binding: STB_GLOBAL
Value: 0x53C
Size: 0x2
- Name: __stack
Section: .persistent
Binding: STB_GLOBAL
Value: 0xFFC0
- Name: _edata
Section: .data
Binding: STB_GLOBAL
Value: 0x53C
- Name: _end
Section: .bss
Binding: STB_GLOBAL
Value: 0x53E
- Name: exit
Index: SHN_ABS
Binding: STB_WEAK
Value: 0x181
- Name: __high_bssstart
Index: SHN_ABS
Binding: STB_WEAK
- Name: __crt0_call_main
Type: STT_FUNC
Section: .text
Binding: STB_GLOBAL
Value: 0x504
Size: 0x6
- Name: _exit
Index: SHN_ABS
Binding: STB_WEAK
Value: 0x181
- Name: open
Index: SHN_ABS
Binding: STB_WEAK
Value: 0x182
- Name: close
Index: SHN_ABS
Binding: STB_WEAK
Value: 0x183
DWARF:
debug_str:
- test.c
- foo
- int
- func
- main
debug_addr:
- Length: 0x10
Version: 0x5
AddressSize: 0x4
Entries:
- Address: 0x53C
- Address: 0x510
- Address: 0x51C
...