lkml.org 
[lkml]   [2003]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Emulating i486 on i386 (was: TSCs are a no-no on i386)
On Thu, 2003-07-31 14:14:48 +0200, Jan-Benedict Glaw <jbglaw@lug-owl.de>
wrote in message <20030731121448.GW1873@lug-owl.de>:
> On Thu, 2003-07-31 12:51:09 +0100, Alan Cox <alan@lxorguk.ukuu.org.uk>
> wrote in message <1059652268.16608.8.camel@dhcp22.swansea.linux.org.uk>:
> > On Iau, 2003-07-31 at 12:38, Jan-Benedict Glaw wrote:
> > > Thanks for that. In the meantime, I've started to give a try to the
> > > userspace version (using a LD_PRELOAD lib). My current Problem:
> > >
> > > amtus:~/sigill_catcher# LD_PRELOAD=./libsigill.so ls
> > > sigill.c:_init():69: sigill started, sigaction() = 0
> > > build.sh intercept.h libsigill.so run.sh sigill.c sigill.o
> > > amtus:~/sigill_catcher# LD_PRELOAD=./libsigill.so apt-get update
> > > Illegal instruction
> > >
> > > See? It's loaded at the "ls" call, but it seems to be not loaded for
> > > apt-get.

So there we are. Thanks to someone who pointed me to LD_DEBUG et al., I
see that my _init() is called too late:

amtus:~/sigill_catcher# LD_DEBUG=all LD_VERBOSE=1
LD_PRELOAD=./libsigill.so apt-get update 2> ld_infos
Illegal instruction
amtus:~/sigill_catcher# grep 'calling init' ld_infos
00691: calling init: /lib/libc.so.6
00691: calling init: /lib/libdl.so.2
00691: calling init: /lib/libgcc_s.so.1
00691: calling init: /lib/libm.so.6
00691: calling init: /usr/lib/libstdc++.so.5

As I guessed, libstdc++5's _init() is called before mine (LD_PRELOADed)
_init() function and thus, I cannot intercept this SIGILL, as it
seems...

Any useful hints from here?

MfG, JBG

--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak!
ret = do_actions((curr | FREE_SPEECH) & ~(IRAQ_WAR_2 | DRM | TCPA));
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.593 / U:0.508 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site