5.23 Inline functions and removal of unused out-of-line functions at link time

The linker cannot remove unused out-of-line functions from an object unless you place the unused out-of-line functions in their own sections.

Use one of the following methods to place unused out-of-line functions in their own sections:

  • --split_sections.

  • __attribute__((section("name"))).

  • #pragma arm section [section_type_list].

  • Linker feedback.

--feedback is typically an easier method of enabling unused function removal.

Non-ConfidentialPDF file icon PDF versionARM DUI0472M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.