Search Results
6/23/2025, 5:44:10 PM
>>105680431
>Format strings can trivially be parsed at compile time, turn on your brain, schizo.
tmp $ cat a.c
#include <stdio.h>
int main()
{
printf("test %d\n", 1);
return 0;
}
tmp $ gcc -s -O3 a.c
tmp $ strings a.out | grep test
test %d
Additionally the string address is just loaded normally in r0, relative to pc
<.text>:
ldr r0, [pc, #20]
mov r1, #1
push {r4, lr}
add r0, pc, r0
bl 3e4 <printf@plt>
No compile-time format string parsing appears to have taken place on -O3
>Format strings can trivially be parsed at compile time, turn on your brain, schizo.
tmp $ cat a.c
#include <stdio.h>
int main()
{
printf("test %d\n", 1);
return 0;
}
tmp $ gcc -s -O3 a.c
tmp $ strings a.out | grep test
test %d
Additionally the string address is just loaded normally in r0, relative to pc
<.text>:
ldr r0, [pc, #20]
mov r1, #1
push {r4, lr}
add r0, pc, r0
bl 3e4 <printf@plt>
No compile-time format string parsing appears to have taken place on -O3
Page 1