Hello All,
I’ve compiled static library (*.a) with Clang3.7 (-target arm-none-eabi) with -Oz (size very matter for me),
on Ubuntu 14.04
but code size still significant bigger, than produced by GCC 4.8.
In Objdump we can see, that there are .ARM.exidx sections (size of these sections - 8 bytes),
but GCC-produced code dont have these sections
Also in readelf we can see, that .text section in almost all cases bigger,
than same sections in GCC-produced code
Flags are same (exclude -Os for GCC and -Oz for Clang)
clang -target arm-none-eabi -Oz -ffunction-sections -fdata-sections -c -nostdinc -isystem …/LIB/include -std=c99 -funsigned-char -mabi=aapcs -mthumb -MD -mcpu=cortex-a5 -mfloat-abi=softfp -mfpu=vfpv3-d16 sin.c -o “LIB/obj/sinl.o”
/usr/bin/arm-none-eabi-gcc -Os -ffunction-sections -fdata-sections -c -nostdinc -isystem …/LIB/include -std=c99 -funsigned-char -mabi=aapcs -mthumb -MD -mcpu=cortex-a5 -mfloat-abi=softfp -mfpu=vfpv3-d16 sin.c -o “LIB/obj/sinl.o”
Could you please give me some tips, how to reduce size of produced library?
If you need any additional information, please let me know.
Best Regards
Paul
Hello All,
I've compiled static library (*.a) with Clang3.7 (-target arm-none-eabi)
with -Oz (size very matter for me),
on Ubuntu 14.04
but code size still significant bigger, than produced by GCC 4.8.
In Objdump we can see, that there are .ARM.exidx sections (size of these
sections - 8 bytes),
but GCC-produced code dont have these sections
Also in readelf we can see, that .text section in almost all cases bigger,
than same sections in GCC-produced code
Flags are same (exclude -Os for GCC and -Oz for Clang)
clang -target arm-none-eabi -Oz -ffunction-sections -fdata-sections -c
-nostdinc -isystem ../LIB/include -std=c99 -funsigned-char -mabi=aapcs
-mthumb -MD -mcpu=cortex-a5 -mfloat-abi=softfp -mfpu=vfpv3-d16 sin.c -o
"LIB/obj/sinl.o"
/usr/bin/arm-none-eabi-gcc -Os -ffunction-sections -fdata-sections -c
-nostdinc -isystem ../LIB/include -std=c99 -funsigned-char -mabi=aapcs
-mthumb -MD -mcpu=cortex-a5 -mfloat-abi=softfp -mfpu=vfpv3-d16 sin.c -o
"LIB/obj/sinl.o"
Could you please give me some tips, how to reduce size of produced library?
If you need any additional information, please let me know.
-fno-exceptions -fno-unwind-tables -Os