It is an ARM M0+ so I made use of the arm-none-eabi-objdump.exe program. Playing with the switched I am closer but still not in the same format as the .S file I compare it with.
Here is the format I aim for:
.cpu cortex-m0plus
.text
.section .text._ZN18LoadStuffC2Ev,"ax",%progbits
.align 1
.global _ZN18LoadStuffC2Ev
.syntax unified
.code 16
.thumb_func
.fpu softvfp
.type _ZN18LoadStuffC2Ev, %function
_ZN18LoadStuffC2Ev:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
movs r3, #0
strb r3, [r0]
strb r3, [r0, #1]
strb r3, [r0, #2]
strb r3, [r0, #3]
strb r3, [r0, #4]
strb r3, [r0, #5]
strb r3, [r0, #6]
strb r3, [r0, #7]
@ sp needed
bx lr
.size _ZN18LoadStuffC2Ev, .-_ZN18LoadStuffC2Ev
.global _ZN18LoadStuffC1Ev
.thumb_set _ZN18LoadStuffC1Ev,_ZN18LoadStuffC2Ev
.section .text._ZN18LoadStuffC2EPh,"ax",%progbits
.align 1
.global _ZN18LoadStuffC2EPh
.syntax unified
.code 16
.thumb_func
.fpu softvfp
.type _ZN18LoadStuffC2EPh, %function
_ZN18LoadStuffC2EPh:
@ args = 0, pretend = 0, frame = 0
...
But this is the closest format I have managed to get:
C:\Users\<User>\AppData\Local\Temp\arduino_build_000007\libraries\Loader\ldr.cpp.o: file format elf32-littlearm
Disassembly of section .text._ZN18LoadStuffC2Ev:
00000000 <_ZN18LoadStuffC1Ev>:
0: 2300 movs r3, #0
2: 2200 movs r2, #0
4: 54c2 strb r2, [r0, r3]
6: 3301 adds r3, #1
8: 2b08 cmp r3, #8
a: d1fa bne.n 2 <_ZN18LoadStuffC1Ev+0x2>
c: 4770 bx lr
Disassembly of section .text._ZN18LoadStuffC2EPh:
00000000 <_ZN18LoadStuffC1EPh>:
0: 2300 movs r3, #0
2: 5cca ldrb r2, [r1, r3]
4: 54c2 strb r2, [r0, r3]
...
Please don't pay attention to the actual code it is just some test code. It is more about the format/style.
I have tried to process both the individual file "loader.cpp.o" and also the overall program file Loader.ino.elf but in vain.
Any ideas what switches I have to set? Do I have to do some post processing myself?