My Oracle Support Banner

Huge Size Of Linked Executables When Compiling With DWARF And Debugging Enabled (Doc ID 1425525.1)

Last updated on JANUARY 05, 2024

Applies to:

Oracle Solaris Studio - Version Sun Studio 11 to 12.3 [Release 11.0 to 12]
Information in this document applies to any platform.

Symptoms

Linked executables are significantly larger compared to older Sun Studio versions after any of the following:


At link time, the linker might hit 32-bit boundaries:

ld: elf error: file <file path and name>: elf_update: Memory allocation error: output file space: Not enough space

Changes

The problem shows up when debugging support has been enabled via any of -g, -g0, or -g3, AND the following option is active:

-xdebugformat=dwarf


-xdebugformat=dwarf is the default

The problem does not show up when the following option is used

-xdebugformat=stabs


-xdebugformat=stabs is the default

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
 Revert back to stabs
 Pros:
 Cons:
 Use gobjcopy to extract DWARF from the linked executable
 Pros:
 Cons:
 Use the 64-bit linker to link 32-bit executables
 Pros:
 Cons:
 Use ancillary files
 Reduce the level of debugging support
 Oracle Solaris Studio 12.3
 Oracle Solaris Studio 12.4
 Pros:
 Cons:
 Additional Information


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.