Closed osresearch closed 4 years ago
With what build system is this? I cannot reproduce it in Fedora.
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .text PROGBITS 00000000000f0000 000f0000
0000000000001ec5 0000000000000000 AX 0 0 16
[ 2] .data PROGBITS 00000000000f1ed0 000f1ed0
0000000000000008 0000000000000000 WA 0 0 4
[ 3] .rodata PROGBITS 00000000000f1ee0 000f1ee0
0000000000000068 0000000000000000 A 0 0 4
[ 4] .eh_frame PROGBITS 00000000000f1f48 000f1f48
00000000000008c8 0000000000000000 A 0 0 4
[ 5] .rodata.str1.1 PROGBITS 00000000000f2810 000f2810
0000000000000034 0000000000000001 AMS 0 0 1
[ 6] .bss NOBITS 00000000000f2860 000f2844
0000000000000080 0000000000000000 WA 0 0 32
[ 7] .init PROGBITS 00000000000fff80 000fff80
0000000000000080 0000000000000000 AX 0 0 16
[ 8] .comment PROGBITS 0000000000000000 00100000
000000000000002c 0000000000000001 MS 0 0 1
[ 9] .shstrtab STRTAB 0000000000000000 0010002c
000000000000004c 0000000000000000 0 0 1
This is compiling with gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
@osresearch Please test with a5300c4949b8d4de2d34bedfaed66793f48ec948
Manually testing on Ubuntu 20.04 produces a 64KB executable with this change.
However, I'm using my fork #27 that has a simple makefile since there seems to be little reason to require meson and ninja. The fork also adds a test for the output size and a github CI action to build the binary. The Ubuntu 18.04 meson package is still 0.45.1, so the mainline branch doesn't work on github's ubuntu-latest builder.
The
objcopy -Obinary
is leaving a relocation section which makes the resultant binary 66696 bytes long.readelf -a
reports: