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

Removal of unused functions

Hi,

I'm using armclang compiler Product:  Professional Component: ARM Compiler 6.16 

There are unused functions which are linked in the final application. There  functions are coming from a library which is linked to final application, but not called in application.

How to remove these unused functions from final image ?

Parents
  • Hi,

    The below are the options used for compilation,

    armclang --target=arm-arm-none-eabi -mcpu=cortex-m7 -Wall -Wextra -Werror -Wno-error=unused-variable -Wno-error=unused-function -Wno-error=unused-parameter -fdiagnostics-absolute-paths -Wno-unused-command-line-argument -Wno-error=unused-private-field -mcpu=cortex-m7 --target=arm-arm-none-eabi -mno-unaligned-access -fno-builtin -c -O3 -fno-fine-grained-bitfield-accesses  -o main.o -c main.c

    armlink --scatter=test.sct --map --callgraph --datacompressor=off --no_remove --entry=Reset_Handler --symbols --no_scanlib  main.o out/bin/main.axf  --list=out/bin/main.map

Reply
  • Hi,

    The below are the options used for compilation,

    armclang --target=arm-arm-none-eabi -mcpu=cortex-m7 -Wall -Wextra -Werror -Wno-error=unused-variable -Wno-error=unused-function -Wno-error=unused-parameter -fdiagnostics-absolute-paths -Wno-unused-command-line-argument -Wno-error=unused-private-field -mcpu=cortex-m7 --target=arm-arm-none-eabi -mno-unaligned-access -fno-builtin -c -O3 -fno-fine-grained-bitfield-accesses  -o main.o -c main.c

    armlink --scatter=test.sct --map --callgraph --datacompressor=off --no_remove --entry=Reset_Handler --symbols --no_scanlib  main.o out/bin/main.axf  --list=out/bin/main.map

Children