Pular para o conteúdo principal
Renesas Brasil - Knowledgebase

How can I do not to link unreferenced functions in library?

Latest Updated:09/10/2007


How can I do not to link unreferenced functions in library?


You can use one of the optimization functions of the optimizing linkage editor: delete unreferenced symbols. You can delete linkage with unused functions by enabling this optimization function. In order to enable this function, an option: -goptimize needs to be specified when compiling library to be linked.

When you built SH C V8 C/C++ compiler by high-performance Embedded Workshop3, Choose [Option] from menu, then [SuperH RISC engine Standard Tool Chain]. Select Compiler tab, and choose Optimization for Category and check a check box for Inter-module Optimization on a newly opend dialog box.
Also an entry function needs to be being specified. Please refer to 4.2.4 Optimize Options in your C/C++ Compiler, Assembler, Optimizing Linkage Editor User’s Manual for information on optimization regarding unreferenced symbol deletion.

Suitable Products
C/C++ Compiler Package for SuperH Family
C/C++ Compiler Package for H8SX, H8S, H8 Family