This section discusses features of object files that affect compatibility between Oracle Developer Studio and GCC.
Some of the Oracle Developer Studio tools depend on additional structural information about the generated code emitted by the compilers. This information is called “annotations” and it is emitted into an ELF section named “.annotations”. Some features of the Code Analyzer depend on annotations. Generation of this data can be controlled using the –xannotate option. The commands that use this information are binopt, code-analyzer, discover, collect, and uncover.
C++ compilers generate ELF symbols that have type information encoded in them. These are called “mangled names.” The format for the mangled names is an implementation detail, so Oracle Developer Studio code compiled in the compat=5 (Sun ABI) mode will not intermix correctly with code compiled with g++. Using the Oracle Developer Studio C++ compiler in gnu modes results in compatible object files. For more information, see Oracle Developer Studio 12.6: C++ User’s Guide.
Compiler features that require instrumenting the object code also require extra libraries or object files to be included at link time. When using these features, you need to link your executable or library with the Oracle Developer Studio compiler. Note that mixing gcc-built code into your program or library will not be instrumented, so the results would be incomplete.
Features in this category are:
Profile Feedback – Includes the options –xprofile and –xlinkopt.
Traditional Profiling – Includes the option –xpg at compile and link time.
Traditional Coverage – Includes the option –xprofile=tcov and the tcov utility.
dbx and other Oracle Developer Studio tools use debugging information generated by the compiler. The majority of the information is recorded in the DWARF format, but some additional indexing information is recorded in an older format called STABS. The ELF sections for dwarf start with “.debug” and the ELF sections for stabs start with “.stab”.