4 ms·
Doesn't work, it prints nothing (on gcc (Debian 13.2.0-1) 13.2.0). Although I found that gcc seems to be configured with -pie per default, so this compilation
by CueXXIII 3y ago
Doesn't work, it prints nothing (on gcc (Debian 13.2.0-1) 13.2.0).
Although I found that gcc seems to be configured with -pie per default, so this compilation works:
$ gcc -Wall -fno-PIE -no-pie main.c -o main
mainf.c:1:11: warning: ‘main’ is usually a function [-Wmain]
1 | const int main[] __attribute__((section(".text"))) = {
| ^~~~
/tmp/ccq0adwj.s: Assembler messages:
/tmp/ccq0adwj.s:4: Warning: ignoring changed section attributes for .text