All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: bunk@kernel.org, wli@holomorphy.com, sparclinux@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: sparc vs. gcc 4.3
Date: Mon, 03 Mar 2008 21:41:11 +0000	[thread overview]
Message-ID: <1204580471.22933.17.camel@brick> (raw)
In-Reply-To: <20080303.130348.25289482.davem@davemloft.net>

On Mon, 2008-03-03 at 13:03 -0800, David Miller wrote:
> From: Adrian Bunk <bunk@kernel.org>
> Date: Mon, 3 Mar 2008 21:26:51 +0200
> 
> >   LD      arch/sparc/boot/image
> > arch/sparc/kernel/built-in.o:(__ex_table+0x394): undefined reference to `kernel_unaligned_trap_fault'
> ...
> > arch/sparc/kernel/built-in.o:(__ex_table+0x46c): undefined reference to `user_unaligned_trap_fault'
> 
> > Does anyone have a clue what's going wrong here?
> 
> We hit the same problem a while back on sparc64 too.
> 
> GCC can't see how the inline asm is reachable so eliminates it
> entirely.  We hide the label inside the inline asm string and call it
> from exception handlers.
> 
> The way we fixed this on sparc64 was quite invasive (patch below for
> reference), so I'll try to come up with something simpler.

Could you hide the asm inside an actual function and annotate the
function with __used?

Similar to how the kprobes has a function called kretprobe_trampoline_holder
for their trampoline asm?

arch/x86/kernel/kprobes.c line 584

Cheers,

Harvey



WARNING: multiple messages have this Message-ID (diff)
From: Harvey Harrison <harvey.harrison@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: bunk@kernel.org, wli@holomorphy.com, sparclinux@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: sparc vs. gcc 4.3
Date: Mon, 03 Mar 2008 13:41:11 -0800	[thread overview]
Message-ID: <1204580471.22933.17.camel@brick> (raw)
In-Reply-To: <20080303.130348.25289482.davem@davemloft.net>

On Mon, 2008-03-03 at 13:03 -0800, David Miller wrote:
> From: Adrian Bunk <bunk@kernel.org>
> Date: Mon, 3 Mar 2008 21:26:51 +0200
> 
> >   LD      arch/sparc/boot/image
> > arch/sparc/kernel/built-in.o:(__ex_table+0x394): undefined reference to `kernel_unaligned_trap_fault'
> ...
> > arch/sparc/kernel/built-in.o:(__ex_table+0x46c): undefined reference to `user_unaligned_trap_fault'
> 
> > Does anyone have a clue what's going wrong here?
> 
> We hit the same problem a while back on sparc64 too.
> 
> GCC can't see how the inline asm is reachable so eliminates it
> entirely.  We hide the label inside the inline asm string and call it
> from exception handlers.
> 
> The way we fixed this on sparc64 was quite invasive (patch below for
> reference), so I'll try to come up with something simpler.

Could you hide the asm inside an actual function and annotate the
function with __used?

Similar to how the kprobes has a function called kretprobe_trampoline_holder
for their trampoline asm?

arch/x86/kernel/kprobes.c line 584

Cheers,

Harvey



  reply	other threads:[~2008-03-03 21:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03 19:26 sparc vs. gcc 4.3 Adrian Bunk
2008-03-03 19:26 ` Adrian Bunk
2008-03-03 21:03 ` David Miller
2008-03-03 21:03   ` David Miller
2008-03-03 21:41   ` Harvey Harrison [this message]
2008-03-03 21:41     ` Harvey Harrison
2008-03-03 22:02     ` David Miller
2008-03-03 22:02       ` David Miller
2008-03-03 23:02 ` David Miller
2008-03-03 23:02   ` David Miller

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=1204580471.22933.17.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=bunk@kernel.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=wli@holomorphy.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.