The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] HOWTO find oops location
Date: Sat, 14 Aug 2004 15:12:47 -0300	[thread overview]
Message-ID: <20040814181247.GI846@logos.cnet> (raw)
In-Reply-To: <200408142159.27719.vda@port.imtp.ilyichevsk.odessa.ua>

On Sat, Aug 14, 2004 at 09:59:27PM +0300, Denis Vlasenko wrote:
> > > > Might be also worth mentioning "gcc -c file.c -g -Wa,-a,-ad  > file.s"
> > > > which makes gcc output C code mixed with asm output.
> > > >
> > > > Sometimes its not as effective as the comment method you describe,
> > > > but it will be less work for sure :)
> > >
> > > Aha! Cool.
> > >
> > > Mmmm... How to ensure that build environment exactly matches one
> > > used during make? Environment, -On level, regparm, other gcc switches,
> > > etc, etc, etc? Else file.s object code can be rather different from
> > > code in file.o...
> >
> > No idea.
> 
> I tried on 2.6:
> 
> make V=1 fs/dcache.o
> make V=1 CFLAGS="-g -Wa,-a,-ad" fs/dcache.o >dcache.asm
> 
> and compared gcc invocation commands. Pseudodiff:
> 
> - -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
> - -fno-common -pipe -msoft-float -mpreferred-stack-boundary=2
> - -march=i486 -I/.1/usr/srcdevel/kernel/linux-2.6.7-bk20.src/include/asm-i386/mach-default
> - -Iinclude/asm-i386/mach-default -O2 -falign-functions=1 -falign-labels=1 -falign-loops=1
> - -falign-jumps=1
> + -g -Wa,-a,-ad
> 
> :(

This worked for me:

gcc -c -g -Wa,-a,-ad -Wp,-MD,fs/.buffer.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude  
-Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -msoft-float 
-mpreferred-stack-boundary=2  -march=athlon -Iinclude/asm-i386/mach-default -O2     
-DKBUILD_BASENAME=buffer -DKBUILD_MODNAME=buffer  fs/buffer.c

The order of the parameters matter in some way, which I have no idea of.

      parent reply	other threads:[~2004-08-14 19:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-14  8:53 [RFC] HOWTO find oops location Denis Vlasenko
2004-08-14  9:11 ` Muli Ben-Yehuda
2004-08-14 13:41   ` Zwane Mwaikambo
2004-08-14 14:06 ` Marcelo Tosatti
     [not found] ` <200408141930.19163.vda@port.imtp.ilyichevsk.odessa.ua>
     [not found]   ` <20040814162201.GE846@logos.cnet>
     [not found]     ` <200408142159.27719.vda@port.imtp.ilyichevsk.odessa.ua>
2004-08-14 18:12       ` Marcelo Tosatti [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040814181247.GI846@logos.cnet \
    --to=marcelo.tosatti@cyclades.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vda@port.imtp.ilyichevsk.odessa.ua \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox