Hi All,
I'm using armcc compiler, and used --no_remove compiler option and build using -O0 compiler flag. After removing --no_remove and used --remove, i see the reset handler.s assembly file vector table is removed. What all to take care while using --remove ? Is it advisable to use the --remove flag. What is the risk in using this flag ?
It is advisable to use the --remove option and a higher optimization level (e.g. -O3 for performance of -Oz for code size). You will see a big improvement in your project if you do so.In order to do this, though, you will need to make sure that that the vector tables (and any other pieces of code that you want to keep, but are not referencing from anywhere: this usually assembly) are kept when linking, and not removed by --remove. You can do this with the --keep option:https://developer.arm.com/documentation/101754/0624/armlink-Reference/armlink-Command-line-Options/--keep-section-id--armlink-