Arm-none-eabi function that never used

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
deadlyboy
Posts: 27
Joined: Wed Nov 26, 2014 9:27 am

Arm-none-eabi function that never used

Post by deadlyboy »

hi every body

i my code where ever i defined variable which i never used , at compile time the compiler eliminate it from compiled code .

so how about unused functions . are they compile ?? i google it and i found it depends on compile but i don't know Arm-none-eabi eliminates that function or not

thanks in advance
MA
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Arm-none-eabi function that never used

Post by Giovanni »

The function is compiled by the compiler, then the linker "garbage collector" removes unused functions from the final code, same for variables.

Giovanni
Post Reply