linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* crash in atexit()
@ 2001-11-11 15:45 Mark Pilon
  2001-11-11 22:49 ` Scott Anderson
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Pilon @ 2001-11-11 15:45 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: jure


our story thus far:

I'm attempting to port the development kernel to a custom controller
with a PPC405PM (that's 405GP + FPU).  I've built my own toolkit
and have built a small target filesystem w/ SELF (many thanks
Wolfgang).

the kernel boots and I can run sash as an init=/bin/sash ...
the kernel finds the filesystem and sash.

I've gotten beyond taking the first FPU-unavailable exception
by adding what appears necessary.

I'm SEGV'ing in atexit(), because of an apparently hard-coded
null pointer dereference: [ the call to atexit() is made by
__libc_start_main so I think I'm close to running ...]

/* Register FUNC to be executed by `exit'.  */
int
atexit (void (*func) (void))
{
  return __cxa_atexit ((void (*) (void *)) func, NULL,
                       &__dso_handle == NULL ? NULL : __dso_handle);
}

which has compiled to:
100004bc <atexit>:
100004bc:       94 21 ff f0     stwu    r1,-16(r1)
100004c0:       7c 08 02 a6     mflr    r0
100004c4:       90 01 00 14     stw     r0,20(r1)
100004c8:       3d 20 00 00     lis     r9,0
100004cc:       38 09 00 00     addi    r0,r9,0
100004d0:       81 69 00 00     lwz     r11,0(r9)
.
.
.

I suspect that this is centered around __dso_handle, but don't
know what this means.

I also suspect this has been covered before, but I've searched and
found references to some "atexit patches" but nothing specific --
If I need to patch my glibc where can I go for said patches?

any overview & context would be appreciated,

Mark
--
Mark Pilon

Minolta-QMS
P.O. Box 37
Fallon, MT.  59326-0037

1-406-853-0433

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-11-11 22:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-11 15:45 crash in atexit() Mark Pilon
2001-11-11 22:49 ` Scott Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).