File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,16 +3,16 @@ app: file format elf32-littlearm
33
44Disassembly of section .text :
55
6- <main>:
7- push {r7, lr}
8- mov r7, sp
9- sub sp, #0x4
10- movs r0, #0x2a
11- str r0, [sp]
12- b 0x14 <main+0xc > @ imm = #-0x2
13- b 0x14 <main+0xc > @ imm = #-0x4
6+ 00000008 <main >:
7+ 8 : push {r7, lr}
8+ a: mov r7, sp
9+ c: sub sp, #0x4
10+ e: movs r0, #0x2a
11+ 10 : str r0, [sp]
12+ 12 : b 0x14 <main+0xc > @ imm = #-0x2
13+ 14 : b 0x14 <main+0xc > @ imm = #-0x4
1414
15- <Reset>:
16- push {r7, lr}
17- mov r7, sp
18- bl 0x8 <main> @ imm = #-0x16
15+ 00000016 <Reset >:
16+ 16 : push {r7, lr}
17+ 18 : mov r7, sp
18+ 1a: bl 0x8 <main> @ imm = #-0x16
Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ app: file format elf32-littlearm
33
44Disassembly of section .text :
55
6- <Reset>:
7- push {r7, lr}
8- mov r7, sp
9- sub sp, #0x4
10- movs r0, #0x2a
11- str r0, [sp]
12- b 0x14 <Reset+0xc > @ imm = #-0x2
13- b 0x14 <Reset+0xc > @ imm = #-0x4
6+ 00000008 <Reset >:
7+ 8 : push {r7, lr}
8+ a: mov r7, sp
9+ c: sub sp, #0x4
10+ e: movs r0, #0x2a
11+ 10 : str r0, [sp]
12+ 12 : b 0x14 <Reset+0xc > @ imm = #-0x2
13+ 14 : b 0x14 <Reset+0xc > @ imm = #-0x4
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ main() {
5252
5353 # check that the Reset symbol is there
5454 diff -b app.text.objdump \
55- <( cargo objdump --bin app -- -d --no-show-raw-insn --no-leading-addr )
55+ <( cargo objdump --bin app -- -d --no-show-raw-insn --print-imm-hex )
5656
5757 # check that the reset vector is there and has the right address
5858 diff -b app.vector_table.objdump \
@@ -70,7 +70,7 @@ main() {
7070 # check that the disassembly matches
7171 pushd app
7272 diff -b app.objdump \
73- <( cargo objdump --bin app -- -d --no-show-raw-insn --no-leading-addr )
73+ <( cargo objdump --bin app -- -d --no-show-raw-insn --print-imm-hex )
7474 # disabled because of rust-lang/rust#53964
7575 # edition_check
7676 popd
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ $ cat src/main.rs
8989The disassembly will be similar but will now include the user ` main ` function.
9090
9191``` console
92- $ cargo objdump --bin app -- -d --no-show-raw-insn
92+ $ cargo objdump --bin app -- -d --no-show-raw-insn --print-imm-hex
9393```
9494
9595``` text
Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ Now let's inspect the output binary to confirm the memory layout looks the way w
214214(this requires [ ` cargo-binutils ` ] ( https://github.com/rust-embedded/cargo-binutils#readme ) ):
215215
216216``` console
217- $ cargo objdump --bin app -- -d --no-show-raw-insn
217+ $ cargo objdump --bin app -- -d --no-show-raw-insn --print-imm-hex
218218```
219219
220220``` text
You can’t perform that action at this time.
0 commit comments