This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Text section size for executable created with ARMCC 6.7 is more than expected

Hi,

I am porting Xilinx standalone drivers and libraries to armcc 6.7 compiler. I tried xilinx hello world application
with the ported code base (for cortexa53 processor), and obseverd that text section size is ~82 KB. However, if i compile same hello world
application with gcc 7.3.1, text size appears to be ~30 KB .

Compiler flags details:

armclang 6.7:
-O0 -g3 -mcpu=cortex-a53 --target=aarch64-arm-none-eabi

gcc 7.3.1:
-O0 -g3

Note: Xilinx hello world application is built with the static library libxil.a, which consist of peripheral drivers. Said statict library is compiled with the optimization level O2 for gcc as well as armclang.

Executable size:


armclang 6.7:

text         data    bss       dec       hex
82248     96      16384   98728   181a8

gcc 7.3.1:

text       data    bss         dec       hex
30516   2344    20632   53492   d0f4

Attaching linker/scatter file and executable dump for gcc as well as armclang for reference.
I am expecting text size to be around 25-30 KB. I went through  armclang executable dump, except MMU tables mmu_tbl0,mmu_tbl1 and mmu_tbl2 (total size ~24KB), i didn't see any function which is taking > 1KB.  Is this increase in code size due to  code added by armclang compiler or am i missing something here?

Thanks,

Mubin

0181.armclang_dump.txt

7242.gcc_dump.txt

0