I used to work with OpenWRT 19 and I am building the OpenWRT 24.
I noticed that some stripped libraries and binaries files are 65k in size, but they should be smaller.
For example, package json-c:
-
Opewrt 19 (gcc 7.5.0)
build_dir/target-mips_24kc_musl/json-c-0.12.1/ipkg-mips_24kc/libjson-c/usr/lib/libjson-c.so.2.0.2 = 29K -
Openwrt 24 (gcc 13.3.0)
build_dir/target-mips_24kc_musl/json-c-0.18/ipkg-mips_24kc/libjson-c/usr/lib/libjson-c.so.5.4.0 = 65K
I know the json-c version is different, but for sure it is not the reason of this difference.
Looking into the binary from Openwrt 24, it seems related to the eh_frame section:
[17] .eh_frame PROGBITS 0000ac4c 00ac4c 000004 00 A 0 0 4
[18] .tbss NOBITS 0001fe78 00fe78 000004 00 WAT 0 0 4
The offset was expected to be AC50, but it is 00fe78. that's about 21k larger.
I have also passed some arguments on CFLAGS to remove eh_frame, but the stripped file is alway 65k.