All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Jesper Juhl <jj@chaosbits.net>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH][rfc] Use int as return type of main in arch/x86/boot/main.c
Date: Mon, 14 Mar 2011 15:50:52 -0700	[thread overview]
Message-ID: <4D7E9BCC.5070204@zytor.com> (raw)
In-Reply-To: <20110314190317.GA20259@home.goodmis.org>

On 03/14/2011 12:03 PM, Steven Rostedt wrote:
> On Sun, Mar 13, 2011 at 11:00:09PM +0100, Jesper Juhl wrote:
>> I believe the return type of main should always be 'int'.
> 
> But this is not userspace, it is called from assmebly in header.S:
> 
>  # Jump to C code (should not return)
>  calll	main
> 
> We don't care what main returns. If it does return anything, then it
> dies:
> 
> # Setup corrupt somehow...
> setup_bad:
>         movl    $setup_corrupt, %eax
>         calll   puts
>         # Fall through...
> 
>         .globl  die
>         .type   die, @function
> die:
>         hlt
>         jmp     die
> 

Yes, but some versions of gcc complains about a nonstandard signature to
main().  At least that's what I assume Jesper's issue was.

	-hpa

  reply	other threads:[~2011-03-14 22:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-13 22:00 [PATCH][rfc] Use int as return type of main in arch/x86/boot/main.c Jesper Juhl
2011-03-14 11:32 ` Harry Wei
2011-03-14 16:49   ` H. Peter Anvin
2011-03-14 19:04     ` Steven Rostedt
2011-03-14 23:35     ` Jesper Juhl
2011-03-14 19:03 ` Steven Rostedt
2011-03-14 22:50   ` H. Peter Anvin [this message]
2011-03-15  2:31     ` Steven Rostedt
2011-03-15 13:55 ` WANG Cong

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=4D7E9BCC.5070204@zytor.com \
    --to=hpa@zytor.com \
    --cc=jj@chaosbits.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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.