4 Jul 20:07
Re: GSoC ShlibMemLoad
From: Andreas Kupries <andreask@...>
Subject: Re: GSoC ShlibMemLoad
Newsgroups: gmane.comp.lang.tcl.core
Date: 2008-07-04 18:07:34 GMT
Subject: Re: GSoC ShlibMemLoad
Newsgroups: gmane.comp.lang.tcl.core
Date: 2008-07-04 18:07:34 GMT
> >> They all have only one actual function greet(). This function get pid > >> of the process which calls it and tries to write it to stdout. > >> libwrite_simple makes it in the easiest possible way: just uses one > >> write sys call. > >> libwrite_global makes it similarly, but a buffer is global now. > >> libwrite_fun calls another function (fill_str to fill buffer with data) > >> These three libraries seems to be working fine. > >> The fourth library libprintf tries to make the same thing easier and > >> use printf instead of write. Anyway, it does not work. I get a > >> segmentation fault (the same happens when I substitute printf for any > >> other functions from stdio.h like puts). > > >> I do not know what may be wrong but I will try to work on it. Maybe > >> the problem is in function load_needed_objects(Obj_Entry *) which is > >> called by elf_dlopen, but I still do not know why it works for the > >> first three libraries. They use functions from unistd.h. > > >I can't say at the moment. It seems that you haven't committed all the > >changes yet, so I have can't see what was done. > > >For example, it is not clear if you are using the OS dlsym() already, or > >not. > > >Best guess I have right now, is that it might be that your non-working > >library depends on some other library FOO instead of just libc. And while > >libc symbols are present the FOO is not loaded (yet) and thus its symbols > >are not present either? > > As far as I know printf function is in libc as well. I also tried to(Continue reading)
2008/7/10 Arnulf Wiedemann <
RSS Feed