Go to main content
Oracle® Developer Studio 12.5: GCC Compatibility Guide

Exit Print View

Updated: June 2017
 
 

Object File Compatibility

This section discusses features of object files that affect compatibility between Oracle Developer Studio and GCC.

Annotations

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++ Mangled Names

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.5: C++ User’s Guide.

Features Using Instrumentation

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.

Debug Information

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”.