Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Last active May 23, 2021 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cleverca22/2ea8c5ad903239e2e00030859a59ac90 to your computer and use it in GitHub Desktop.
Save cleverca22/2ea8c5ad903239e2e00030859a59ac90 to your computer and use it in GitHub Desktop.
[nix-shell:~/apps/rpi/lk-overlay]$ vc4-elf-readelf -S build-rpi4-start4/lk.elf
There are 23 section headers, starting at offset 0x9278c:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .text PROGBITS c4000000 001000 01d774 00 AX 0 0 4
[ 2] .text.bootloader_ PROGBITS c401d774 01e774 000010 00 WA 0 0 4
[ 3] .text.firmware_re PROGBITS c401d784 01e784 000010 00 WA 0 0 4
[ 4] .rodata PROGBITS c401d794 01e794 006ae8 00 A 0 0 4
[ 5] commands PROGBITS c402427c 02527c 000114 00 A 0 0 4
[ 6] apps PROGBITS c4024390 025390 00003c 00 A 0 0 4
[ 7] lk_init PROGBITS c40243cc 0253cc 000030 00 A 0 0 4
[ 8] .vectorTable PROGBITS c4024400 025400 000200 00 WA 0 0 512
[ 9] .data PROGBITS c4024600 025600 0001f0 00 WA 0 0 4
[10] .bss NOBITS c4024800 0257f0 0028c0 00 WA 0 0 32
[11] .comment PROGBITS 00000000 0257f0 00001a 01 MS 0 0 1
[12] .debug_aranges PROGBITS 00000000 02580a 000fe8 00 0 0 1
[13] .debug_info PROGBITS 00000000 0267f2 027dee 00 0 0 1
[14] .debug_abbrev PROGBITS 00000000 04e5e0 00a448 00 0 0 1
[15] .debug_line PROGBITS 00000000 058a28 021449 00 0 0 1
[16] .debug_frame PROGBITS 00000000 079e74 00640c 00 0 0 4
[17] .debug_str PROGBITS 00000000 080280 006129 01 MS 0 0 1
[18] .debug_ranges PROGBITS 00000000 0863a9 001118 00 0 0 1
[19] .debug_loc PROGBITS 00000000 0874c1 00b1db 00 0 0 1
[20] .shstrtab STRTAB 00000000 09269c 0000f0 00 0 0 1
[21] .symtab SYMTAB 00000000 092b24 005000 10 22 767 4
[22] .strtab STRTAB 00000000 097b24 003437 00 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings)
I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
O (extra OS processing required) o (OS specific), p (processor specific)
[nix-shell:~/apps/rpi/lk-overlay]$ vc4-elf-objdump -h build-rpi4-start4/lk.elf
build-rpi4-start4/lk.elf: file format elf32-vc4
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 0001d774 c4000000 c4000000 00001000 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .text.bootloader_state 00000010 c401d774 c401d774 0001e774 2**2
CONTENTS, ALLOC, LOAD, DATA
2 .text.firmware_rev 00000010 c401d784 c401d784 0001e784 2**2
CONTENTS, ALLOC, LOAD, DATA
3 .rodata 00006ae8 c401d794 c401d794 0001e794 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 commands 00000114 c402427c c402427c 0002527c 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 apps 0000003c c4024390 c4024390 00025390 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 lk_init 00000030 c40243cc c40243cc 000253cc 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .vectorTable 00000200 c4024400 c4024400 00025400 2**9
CONTENTS, ALLOC, LOAD, DATA
8 .data 000001f0 c4024600 c4024600 00025600 2**2
CONTENTS, ALLOC, LOAD, DATA
9 .bss 000028c0 c4024800 c4024800 000257f0 2**5
ALLOC
10 .comment 0000001a 00000000 00000000 000257f0 2**0
CONTENTS, READONLY
11 .debug_aranges 00000fe8 00000000 00000000 0002580a 2**0
CONTENTS, READONLY, DEBUGGING
12 .debug_info 00027dee 00000000 00000000 000267f2 2**0
CONTENTS, READONLY, DEBUGGING
13 .debug_abbrev 0000a448 00000000 00000000 0004e5e0 2**0
CONTENTS, READONLY, DEBUGGING
14 .debug_line 00021449 00000000 00000000 00058a28 2**0
CONTENTS, READONLY, DEBUGGING
15 .debug_frame 0000640c 00000000 00000000 00079e74 2**2
CONTENTS, READONLY, DEBUGGING
16 .debug_str 00006129 00000000 00000000 00080280 2**0
CONTENTS, READONLY, DEBUGGING
17 .debug_ranges 00001118 00000000 00000000 000863a9 2**0
CONTENTS, READONLY, DEBUGGING
18 .debug_loc 0000b1db 00000000 00000000 000874c1 2**0
CONTENTS, READONLY, DEBUGGING
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment