* [uml-devel] Segfault on UML load
@ 2004-03-31 23:56 Charles A. Clinton
2004-04-01 18:21 ` BlaisorBlade
2004-04-01 22:16 ` Charles A. Clinton
0 siblings, 2 replies; 4+ messages in thread
From: Charles A. Clinton @ 2004-03-31 23:56 UTC (permalink / raw)
To: user-mode-linux-devel
When I build a UML kernel on my Fedora Core 1 machine, it segfaults when
it tries to load. It looks to me like changes in binutils to support
exec-shield have added a STACK program header at 0x00000000, causing the
image to appear to be 2.5G in size.
Is this a:
1) known and solved
2) an open issue that I need to work on a fix for
3) nobody cares
kind of problem?
(My guess is that adding some commands to arch/um/ld.link.in to disappear
or move the STACK program header is the right way to fix it)
-- Charles
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [uml-devel] Segfault on UML load
2004-03-31 23:56 [uml-devel] Segfault on UML load Charles A. Clinton
@ 2004-04-01 18:21 ` BlaisorBlade
2004-04-01 22:16 ` Charles A. Clinton
1 sibling, 0 replies; 4+ messages in thread
From: BlaisorBlade @ 2004-04-01 18:21 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: Charles A. Clinton
Alle 01:56, giovedì 1 aprile 2004, Charles A. Clinton ha scritto:
> When I build a UML kernel on my Fedora Core 1 machine, it segfaults when
> it tries to load.
There are reports of this, but was related either to NPTL or to exec-shield
(and people succeeded in solving it).
> It looks to me like changes in binutils to support
> exec-shield have added a STACK program header at 0x00000000, causing the
> image to appear to be 2.5G in size.
Nobody has ever had this clue... I've no idea of those changes.
> Is this a:
> 1) known and solved
> 2) an open issue that I need to work on a fix for
> 3) nobody cares
> kind of problem?
>
> (My guess is that adding some commands to arch/um/ld.link.in to disappear
> or move the STACK program header is the right way to fix it)
Well, see this for the solution everybody used:
http://toast.debian.net/~may/umlproject/bugs.html
If you succeed in doing the patch you suggest, then post the patch. If you
think you are right but aren't able to do the fix, wait for answers from
somebody smarter than me(especially M A Young who hacks UML on Fedora) or
post evidence/explanations about your problem.
Bye
--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&opÌk
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [uml-devel] Segfault on UML load
2004-03-31 23:56 [uml-devel] Segfault on UML load Charles A. Clinton
2004-04-01 18:21 ` BlaisorBlade
@ 2004-04-01 22:16 ` Charles A. Clinton
2004-04-02 19:50 ` BlaisorBlade
1 sibling, 1 reply; 4+ messages in thread
From: Charles A. Clinton @ 2004-04-01 22:16 UTC (permalink / raw)
To: user-mode-linux-devel
On Wed, 31 Mar 2004, I wrote:
> When I build a UML kernel on my Fedora Core 1 machine, it segfaults when
> it tries to load.
Blaisorblade pointed me to a 2.6 patch set which provides the answer.
The link.ld script puts an empty 4K page at the front of the UML image.
The Fedora glibc expects the elf program headers to be at the start of the
image and searched them form information regarding stack executability.
The empty page is not mapped, and the search segfaults. I suspect that
there is a bug in binfmt_elf that is not taking into account the load
offset when setting up the aux vector, but the code is so convoluted there
that I am mostly dazed.
Anyway, the following patch (adapted from
http://toast.debian.net/~may/umlproject/unpackaged/align.patch) when
applied on top of uml-patch-2.4.22-1, fixes the problem. It should work
for any of the 2.4.x patches.
Thanks to Blaisorblade for pointing me to the UML for Fedora page.
diff -Naur linux-2.4.22/arch/um/dyn_link.ld.in linux-2.4.22.works/arch/um/dyn_link.ld.in
--- linux-2.4.22/arch/um/dyn_link.ld.in 2004-04-01 11:26:04.000000000 -0800
+++ linux-2.4.22.works/arch/um/dyn_link.ld.in 2004-04-01 11:32:35.000000000 -0800
@@ -8,7 +8,6 @@
{
. = START() + SIZEOF_HEADERS;
.interp : { *(.interp) }
- . = ALIGN(4096);
__binary_start = .;
. = ALIGN(4096); /* Init code and data */
_stext = .;
diff -Naur linux-2.4.22/arch/um/link.ld.in linux-2.4.22.works/arch/um/link.ld.in
--- linux-2.4.22/arch/um/link.ld.in 2004-04-01 11:26:07.000000000 -0800
+++ linux-2.4.22.works/arch/um/link.ld.in 2004-04-01 11:32:19.000000000 -0800
@@ -6,7 +6,6 @@
{
. = START() + SIZEOF_HEADERS;
- . = ALIGN(4096);
__binary_start = .;
ifdef(`MODE_TT', `
.thread_private : {
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-04-02 19:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-31 23:56 [uml-devel] Segfault on UML load Charles A. Clinton
2004-04-01 18:21 ` BlaisorBlade
2004-04-01 22:16 ` Charles A. Clinton
2004-04-02 19:50 ` BlaisorBlade
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox