From: Andi Kleen <ak@muc.de>
To: Keith Owens <kaos@sgi.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>, Jan Hubicka <jh@suse.cz>,
Jack F Vogel <jfv@bluesong.net>,
linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>
Subject: Re: [discuss] booting a kernel compiled with -mregparm=0
Date: Wed, 19 Jan 2005 00:15:15 +0100 [thread overview]
Message-ID: <m1acr649do.fsf@muc.de> (raw)
In-Reply-To: <7152.1106080706@kao2.melbourne.sgi.com> (Keith Owens's message of "Wed, 19 Jan 2005 07:38:26 +1100")
Keith Owens <kaos@sgi.com> writes:
> Nobody has been concerned enough about the backtraces on i386 and
> x86_64 to add the required unwind data to the kernel for those
> platforms. If you want to extract the dwarf data from a kernel
> compiled with -g, include the dwarf data in the running kernel and add
> a dwarf unwinder to the kernel then I will happily accept patches to
> kdb. Don't forget about support for adding and removing unwind data as
It would be pretty easy to do.
The x86-64 ABI actually includes unwind data (without other dwarf
data) by default in all executables. However it wasn't needed in the
kernel so far so I turned it off to save some disk space:
If you want it without -g just remove the
ifneq ($(CONFIG_DEBUG_INFO),y)
CFLAGS += -fno-asynchronous-unwind-tables
endif
in arch/x86_64/Makefile. Then to actually use it in the running kernel
you would need to change the unwind segment in the vmlinux.lds.S
to be loaded instead of discarded at link time (one liner change too)
And something to map it for modules (i haven't looked at that, but
I suppose if ia64 has the infrastructure it shouldn't be hard to port)
I wouldn't be opposed to a new CONFIG_RUNTIME_UNWIND that does all
this. However without an working unwinder in kernel it's not very useful.
>
> BTW, even on IA64 which has unwind data, we still get problems because
> the unwind data only says what parameters are passed in registers, it
> says nothing about register reuse. gcc can reuse a parameter register
> if the parameter value is no longer required, for example :-
This is no different from stack based parameters where the stack slot
of the parameter can be overwritten by the callee too.
You just will have to live with that.
-Andi
prev parent reply other threads:[~2005-01-18 23:15 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-14 16:34 booting a kernel compiled with -mregparm=0 Tigran Aivazian
2005-01-14 20:56 ` [discuss] " Jan Hubicka
2005-01-14 21:28 ` linux-os
2005-01-15 2:29 ` H. Peter Anvin
2005-01-17 9:30 ` Tigran Aivazian
2005-01-17 9:53 ` Arjan van de Ven
2005-01-17 10:04 ` Tigran Aivazian
2005-01-17 18:10 ` H. Peter Anvin
2005-01-17 20:22 ` Andi Kleen
2005-01-17 20:38 ` H. Peter Anvin
2005-01-17 22:08 ` Andi Kleen
2005-01-18 11:25 ` Tigran Aivazian
2005-01-18 11:51 ` Arjan van de Ven
2005-01-18 13:04 ` Tigran Aivazian
2005-01-18 13:16 ` Tigran Aivazian
2005-01-17 10:59 ` Andi Kleen
2005-01-17 13:17 ` Tigran Aivazian
2005-01-17 16:38 ` Linus Torvalds
2005-01-18 20:38 ` Keith Owens
2005-01-18 23:15 ` Andi Kleen [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=m1acr649do.fsf@muc.de \
--to=ak@muc.de \
--cc=hpa@zytor.com \
--cc=jfv@bluesong.net \
--cc=jh@suse.cz \
--cc=kaos@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox