[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Export Symbols from shared library without source
> > LD_PRELOAD=/topath/to/libdriver.so
> > export LD_PRELOAD
> >
> > I get:
> >
> > insmod ./interceptor.ko
> > insmod: error while loading shared libraries:
> > /path/to/libdriver.so: ELF file's phentsize not the
> > expected size
>
> Using LD_PRELOAD to pre-load a library is a facility useful
> for user applications. This will not help in whatever you
> are trying to do. The error you are seeing is not from
> insmod, it's from the run-time linker. If you had run 'ls'
> instead of insmod, you would have seen the same error.
Enlightened. And yes, I get the same error whenever i execute
something. A constant reminder.
> > > insmod ./interceptor.ko
> > > Error inserting './interceptor.ko': -1 Unknown symbol in module
> > >
> > > And in my log, I get this:
> > >
> > > Jun 28 11:22:44 philyra kernel: interceptor: Unknown symbol
> > CniPluginUnload
> > > Jun 28 11:22:44 philyra kernel: interceptor: Unknown symbol
> > CNICallbackTable
> > > ...
> > > ...
> > >
> > > Apparently, all the unknown symbols seem to come from
> > > the shared library, libdriver.so, that i do not have
> > > source from. Is there any way to make these symbols
> > > exported so that i can use the vpn client?
>
> The shared library is implementing some functionality to
> be used in user-mode. You can't access is directly from
> a kernel module. Does your module really belong in the
> kernel? Or is it better to have it as a user-mode app?
Actually, the module is part of the cisco vpn client. i noticed that
it compiles the 2.4.x kernel module with the shared library because
the lkm do make use of the library. Strange as it sounds though.
--
Eugene TEO @ Linux Users Group, Singapore <eugeneteo@lugs.org.sg>
GPG FP: D851 4574 E357 469C D308 A01E 7321 A38A 14A0 DDE5
main(i){putchar(182623909>>(i-1)*5&31|!!(i<7)<<6)&&main(++i);}
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/