Re: address space problem on dynamically linked libs

From: Dave (davis_eric_at_yahoo.com)
Date: 05/15/04


Date: 15 May 2004 07:22:07 -0700

Kasper Dupont <kasperd@daimi.au.dk> wrote in message news:<40A5B035.5E403CDB@daimi.au.dk>...
> Dave wrote:
> >
> > Hi, there
> > Got a weird problem on dlls under unix/linux
> >
> > Say I have a the following codes in my kernel:
> > namespace name_space{
> > class_name& get_object() {
> > static class_name object_of_the_class;
> > return object_of_the_class;
> > }
> > }
>
> That is not C code. The kernel is written in C.

sorry for the confusion. By kernel, I mean the codes which I want my
dll libs to commnunicate with. It's not the system kernel codes.

> >
> > Then in the dll *.so file, I have the following codes:
> > a_object = name_space::get_object()
>
> So this is userspace code right. It has got to be
> because .so files are not used for kernel code.
>
> >
> > Also in more than once place in my kernel, I have similar codes as:
> > b_object = name_space::get_object()
>
> Again there is something wrong with the language.
> You may use that language for user space code, but
> not for kernel code.
>
> >
> > Could any one points out why and how to make both dll *so and kernel
> > refer
> > to the same objects?
>
> That is impossible. What are you trying to do?
> Communication between kernel code and user code must
> be done through system calls.
>
> FUT: cold.system

So, do you mean my dll libs can't communicate with my central codes?

Thanks for future clarification.



Relevant Pages

  • Re: C++ pushback
    ... Haskell is an excellent language, but it is not a system programming ... Kernel programming does not fit well into the functional model. ... a lot of functions/methods have identical names. ...
    (Linux-Kernel)
  • Re: can anyone offer Lisp job?
    ... >> since I'm sure someone will say this argues for turning Common Lisp ... I think the Lisp kernel isn't that much bigger than ... > the Scheme kernel. ... differently because there wasn't the notion of Language As King. ...
    (comp.lang.lisp)
  • Re: kernel stack challenge
    ... You support the idea of using LISP because it's a high-level language ... you invalidate your reason for wanting to use LISP. ... If you want the interpreter to live in the kernel, ...
    (Linux-Kernel)
  • Re: Compiling C++ modules
    ... clear to one who knows the language it's written in. ... everyone can read the kernel code. ... Were they C coders or C++ coders? ... things like this you'd never want the compiler to decide for you. ...
    (Linux-Kernel)
  • Re: Compiling C++ kernel module + Makefile
    ... >>that you might want check whether you're not calling the kettle black. ... > used within the kernel. ... userspace with negligible performance loss, this app will be able to ... > everything could be done using the first language they learned. ...
    (Linux-Kernel)