diff --git a/build/final.elf b/build/final.elf index 05862f9..281f132 100755 Binary files a/build/final.elf and b/build/final.elf differ diff --git a/build/final.elf.map b/build/final.elf.map index 28bc4eb..dbff8ae 100644 --- a/build/final.elf.map +++ b/build/final.elf.map @@ -112,23 +112,23 @@ LOAD linker stubs .debug_rnglists 0x00000013 0x19 build/startup.o -.debug_macro 0x00000000 0x19f3 - .debug_macro 0x00000000 0xaaa build/main.o - .debug_macro 0x00000aaa 0xafc build/startup.o - .debug_macro 0x000015a6 0x22 build/startup.o - .debug_macro 0x000015c8 0x8e build/startup.o - .debug_macro 0x00001656 0x51 build/startup.o - .debug_macro 0x000016a7 0x103 build/startup.o - .debug_macro 0x000017aa 0x6a build/startup.o - .debug_macro 0x00001814 0x1df build/startup.o +.debug_macro 0x00000000 0x19f9 + .debug_macro 0x00000000 0xab0 build/main.o + .debug_macro 0x00000ab0 0xafc build/startup.o + .debug_macro 0x000015ac 0x22 build/startup.o + .debug_macro 0x000015ce 0x8e build/startup.o + .debug_macro 0x0000165c 0x51 build/startup.o + .debug_macro 0x000016ad 0x103 build/startup.o + .debug_macro 0x000017b0 0x6a build/startup.o + .debug_macro 0x0000181a 0x1df build/startup.o .debug_line 0x00000000 0x120 .debug_line 0x00000000 0x4f build/main.o .debug_line 0x0000004f 0xd1 build/startup.o -.debug_str 0x00000000 0x3be8 - .debug_str 0x00000000 0x2da8 build/main.o - .debug_str 0x00002da8 0xe40 build/startup.o +.debug_str 0x00000000 0x3bf0 + .debug_str 0x00000000 0x2db0 build/main.o + .debug_str 0x00002db0 0xe40 build/startup.o 0x3d41 (size before relaxing) .comment 0x00000000 0x45 diff --git a/build/main.S b/build/main.S index cc80062..cd695fd 100644 --- a/build/main.S +++ b/build/main.S @@ -26,7 +26,7 @@ .type main, %function main: .LFB0: - .loc 1 1 16 + .loc 1 3 16 .cfi_startproc @ args = 0, pretend = 0, frame = 0 @ frame_needed = 1, uses_anonymous_args = 0 @@ -36,9 +36,9 @@ main: .cfi_offset 7, -4 add r7, sp, #0 .cfi_def_cfa_register 7 - .loc 1 2 10 + .loc 1 4 10 movs r3, #42 - .loc 1 3 1 + .loc 1 5 1 mov r0, r3 mov sp, r7 .cfi_def_cfa_register 13 @@ -60,18 +60,18 @@ main: .byte 0x4 .4byte .Ldebug_abbrev0 .uleb128 0x1 - .4byte .LASF453 - .byte 0x1d .4byte .LASF454 + .byte 0x1d .4byte .LASF455 + .4byte .LASF456 .4byte .LLRL0 .4byte 0 .4byte .Ldebug_line0 .4byte .Ldebug_macro0 .uleb128 0x2 - .4byte .LASF456 - .byte 0x1 + .4byte .LASF457 .byte 0x1 + .byte 0x3 .byte 0x5 .4byte 0x40 .4byte .LFB0 @@ -1538,6 +1538,9 @@ main: .byte 0x5 .uleb128 0 .4byte .LASF452 + .byte 0x5 + .uleb128 0x1 + .4byte .LASF453 .byte 0x4 .byte 0 .section .debug_line,"",%progbits @@ -1732,7 +1735,7 @@ main: .ascii "__ARM_NEON\000" .LASF400: .ascii "__ARM_FEATURE_CMSE\000" -.LASF455: +.LASF456: .ascii "/home/alex/code/own/c-compile-experiments\000" .LASF229: .ascii "__FLT64_IS_IEC_60559__ 2\000" @@ -2270,7 +2273,7 @@ main: .ascii "__UINT64_C(c) c ## ULL\000" .LASF310: .ascii "__LACCUM_EPSILON__ 0x1P-31LK\000" -.LASF456: +.LASF457: .ascii "main\000" .LASF250: .ascii "__SFRACT_EPSILON__ 0x1P-7HR\000" @@ -2292,6 +2295,8 @@ main: .ascii "__INTPTR_MAX__ 0x7fffffff\000" .LASF385: .ascii "__PRAGMA_REDEFINE_EXTNAME 1\000" +.LASF453: + .ascii "exit 42\000" .LASF224: .ascii "__FLT64_EPSILON__ 2.2204460492503131e-16F64\000" .LASF40: @@ -2334,7 +2339,7 @@ main: .ascii "__SIZE_TYPE__ unsigned int\000" .LASF321: .ascii "__ULLACCUM_FBIT__ 32\000" -.LASF453: +.LASF454: .ascii "GNU C17 12.3.1 20230626 -mcpu=cortex-m4 -mthumb -mf" .ascii "loat-abi=hard -mfpu=fpv4-sp-d16 -march=armv7e-m+fp " .ascii "-g3 -ggdb -O0 -ffunction-sections -fdata-sections -" @@ -2378,7 +2383,7 @@ main: .ascii "L)\000" .LASF50: .ascii "__UINT64_TYPE__ long long unsigned int\000" -.LASF454: +.LASF455: .ascii "src/main.c\000" .LASF244: .ascii "__FLT32X_HAS_QUIET_NAN__ 1\000" diff --git a/build/main.i b/build/main.i index 672bc7d..94d0cbc 100644 --- a/build/main.i +++ b/build/main.i @@ -907,6 +907,8 @@ # 0 "" #define __USES_INITFINI__ 1 # 1 "src/main.c" +#define exit 42 + int main(void) { return 42; } diff --git a/build/main.o b/build/main.o index 9bc5058..68894d6 100644 Binary files a/build/main.o and b/build/main.o differ diff --git a/src/main.c b/src/main.c index 25b1c05..34e8d37 100644 --- a/src/main.c +++ b/src/main.c @@ -1,3 +1,5 @@ +#define exit 42 + int main(void) { - return 42; + return exit; }