Summary of Compiler and Linker Options

This is a brief summary of the compiler and linker options that are related to support for the Dynamic Linking Model in the C6000 CGT.

Table 8-13 Compiler Options For Dynamic Linking

Option Description
--dsbt Generates addressing via Dynamic Segment Base Table
--export_all_cpp_vtbl Exports C++ virtual tables by default
--import_undef[=off|on] Specifies that all global symbol references that are not defined in a module are imported. Default is on.
--import_helper_functions Specifies that all compiler generated calls to run-time-support functions are treated as calls to imported functions. See Section 8.12.5.
--inline_plt[=off|on] Inlines the import function call stub. Default is on.
--linux Generates code for Linux.
--pic[=off|on] Generates position independent addressing for a shared object. Default is near.
--visibility={hidden|
    default|protected}
Specifies a default visibility to be assumed for global symbols. See Section 8.12.5.
–wchar_t Generates 32-bit wchar_t type. By default the compiler generates 16-bit wchar_t.

Table 8-14 Linker Options For Dynamic Linking

Option Description
--dsbt_index=int Requests a specific Data Segment Base Table (DSBT) index to be associated with the current output file. If the DSBT model is being used, and you do not request a specific DSBT index for the output file, then a DSBT index is assigned to the module at load time.
--dsbt_size=int Specifies the size of the Data Segment Base Table (DSBT) for the current output file, in words. If the DSBT model is being used, this option can be used to override the default DSBT size (8 words).
--dynamic[=exe] Specifies that the result of a link will be a dynamic executable. See Section 8.12.3.1.
--dynamic=lib Specifies that the result of a link will be a dynamic library. See Section 8.12.4.1.
--export=symbol Specifies that symbol is exported by the ELF object that is generated for this link.
--fini=symbol Specifies the symbol name of the termination code for the output file currently being linked.
--import=symbol Specifies that symbol is imported by the ELF object that is generated for this link.
--init=symbol Specifies the symbol name of the initialization code for the output file currently being linked.
--rpath=dir Adds a directory to the beginning of the dynamic library search path.
--runpath=dir Adds a directory to the end of the dynamic library search path.
--shared Generates a dynamically shared object.
--soname=string Specifies shared object name to be used to identify this ELF object to the any downstream ELF object consumers.
--sysv Generates SysV ELF output file.