lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 21 Apr 2009 13:40:50 -0400 (EDT)
From:	Anders Kaseorg <andersk@....EDU>
To:	Américo Wang <xiyou.wangcong@...il.com>
cc:	Tim Abbott <tabbott@....edu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Linux kernel mailing list <linux-kernel@...r.kernel.org>,
	Waseem Daher <wdaher@....edu>,
	Denys Vlasenko <vda.linux@...glemail.com>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Andi Kleen <andi@...stfloor.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Jeff Arnold <jbarnold@....edu>
Subject: Re: [PATCH v2 0/4] Add support for compiling with	-ffunction-sections
 -fdata-sections

On Tue, 21 Apr 2009, Américo Wang wrote:
> Nice work! But, don't -ffunction-sections and -fdata-sections have
> collisions with '-g' and 'gprof'? Just like what gcc(1) describes.

That description seems to be long obsolete.  gcc used to warn that 
-ffunction-sections may affect debugging, but that warning was disabled 
for ELF targets in 1999, presumably because ELF has always supported 
arbitrary section names even though some other object formats have issues.
  <http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00975.html>

I know that debugging under -ffunction-sections -g works fine on at least 
x86, which is the only platform on which we currently propose to provide 
this option, and based on that message it looks like other platforms are 
fine too.

> IIRIC, another project of linux kernel is trying to 'gprof' the kernel 
> too.

gprof requires compiling with -pg, and yes, there is a conflict with 
-ffunction-sections -pg, as documented in the config help text.
  <http://lkml.org/lkml/2009/2/4/487>

That is why CONFIG_FUNCTION_DATA_SECTIONS already depends on 
!CONFIG_FUNCTION_TRACER.  Any external project that tries to add -pg to an 
-ffunction-sections kernel will get this warning from gcc:
  warning: -ffunction-sections disabled; it makes profiling impossible
which makes the situation clear.

This conflict appears to be bogus, and we have had no trouble with 
-ffunction-sections -pg after patching the conflict out of the gcc source.  
So we may eventually be able to remove it.
  <http://gcc.gnu.org/ml/gcc-help/2008-11/msg00128.html>

Anders
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ