[lsb-discuss] LSBCC generating debug enabled build even if "-g" option is not specified.

Suresh Pamidipati VPamidipati at goahead.com
Tue Oct 5 07:43:00 PDT 2010

Hi Mats,

Thanks for the information. The native gcc compilation also showed these sections in the executable, as you said. I tried by giving the options "-Wl,-verbose" and the output showed that "using the internal linker script" and it has these sections also. But I could not find the script name/path to try and change.

Thanks for your help.


-----Original Message-----
From: Wichmann, Mats D [mailto:mats.d.wichmann at intel.com] 
Sent: Tuesday, October 05, 2010 7:46 PM
To: Suresh Pamidipati; lsb-discuss at lists.linux-foundation.org
Subject: RE: [lsb-discuss] LSBCC generating debug enabled build even if "-g" option is not specified.

lsb-discuss-bounces at lists.linux-foundation.org wrote:
> Hi All,
> We have noticed that LSBCC is generating the sections
> .debug_info, .debug_aranges, .debug_str, .debug_abbrev, etc in
> all the executables/libraries. Due to this LSB AppChecker is
> reporting warnings that these are not in LSB. We have seen
> this in SUSE 10.2 machine. Does LSBCC generate debug enabled
> build even if "-g" option is not specified.? If so, how can we
> have debug-disabled build of binaries/libraries.?
> Can anyone please provide any information on this. It will be really
> helpful. 

in this area, lsbcc does nothing, so I believe (without
absolute proof) this is simply a side effect of how
the native gcc/toolchain is configured.  I expect you'll
see the same sections if building natively, even without
debug flags.

don't worry about warnings, section warnings are generated if
the tools know a section is not described in LSB, but is not
a problem even if present - true for the debug sections certainly.
That is, we know that if some distribution was used where the
linker did not understand these sections it could safely ignore
them, and thus they're not a problem for LSB compliance.

More information about the lsb-discuss mailing list