This question already has answers here:
How to build a Linux kernel module so that it is compatible with all kernel releases?
(3 answers)
Closed 3 years ago.
The security software I'm building contains a kernel module.
because the kernel must process the packet.
Do not use DKMS because it is commercial software.
If the kernel version goes up, insmod doesn't work.
What should I do? Do you have a good idea?
If you can't load the modules dynamically then another option to load the modules is making it as part of the kernel. Refer the following link :
http://newbiedoc.sourceforge.net/system/kernel-pkg.html
Related
This question already has answers here:
C library source code [closed]
(6 answers)
Closed 4 years ago.
There is some way to see the source code of the functions contained in the C standard library and in the headers files like stdio.h?
https://www.gnu.org/software/libc/ there you go. Google is the best answer in some cases!
Depends on what you want to do with it. If you only want to get some idea then you can go with Gixuna's response. If you need to see your system's exact source code you have to get it from your distribution, they may apply patches, backports. For example if you have a debian system or derivates you can say:
apt-get source libc6
RPM based systems have different methods to get their SRPMs but I'm not familiar with those.
Also, be prepared that analyzing this source code will not be a walk in the park.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am tasked with porting a massive c project from windows to linux. I have never ported anything over to linux before and am pretty new to linux. The project uses quite a bit of win32 calls. I have looked through some of it and understand what those parts do, however there are many moving parts and i feel it would take too much time to look through it all. What would be the best way to port it over? Is it foolish of me to think I can move the project over to the linux machine and work through the errors one by one?
Thank you in advanced!
Wine is a Windows Emulator for Linux, more exactly a re-implementation of the Windows API and binary interface, mainly for Unix-like OSes. It has also a builtin library named libwine, which is essentially a compatibility layer between the relevant Linux APIs (mainly: libc and X11) and the Win32.
Compiling the project with libwine, you will compile a Linux executable (binary), using the libwine as a shared lib (shared lib == dll). On this way, you can use the Windows API calls in a Linux project.
Your knowledge of the Win32 API helps a lot, most likely the compatibility isn't 100%. Probably you will have to modify the code a little bit (but not too much).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
My question is whether Linux kernel contains libc.so.6? After googling and going through different links, we found that libc.so.6, is not a part of Linux kernel, as the kernel has same libraries implemented for its own use in kernel space. libc.so.6 is a userspace library. But, still, the question was left, if the libc.so.6 is removed from "/lib", it crashes, as all the basic applications of Linux crashes.
So, the basic questions were left on:
Can Linux run without libc.so.6? If yes, where such implementation is used?
Who provides libc.so.6? Is it provided by Linux distributions only?
Does Linux internally supports threading or not?
Yes. For example, I could write an application in assembly that did not use libc. Here are some examples: https://stackoverflow.com/questions/284797/hello-world-in-less-than-20-bytes
On Linux, glibc is a common implementation of libc: https://www.gnu.org/software/libc/
Yes. The threading options that glibc provides are a shim layer over a kernel interface.
Can Linux run without libc.so.6? If yes, where is this the case?
Compiling the code with option -nostdlib won't use standard libraries,
man GCC tells,
-nostdlib
Do not use the standard system startup files or libraries when linking. No
startup files and only the libraries you specify will be passed to the linker.
The compiler may generate calls to memcmp, memset, memcpy and memmove. These
entries are usually resolved by entries in libc. These entry points should be
supplied through some other mechanism when this option is specified.
Check webpage for good glibc free implementation.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Can I get C’s pthread.h to compile in Windows?
I am using eclipse on Windows 7.I am trying multi threaded programming in C.But I am not able to include pthread.h.It says No such file or directory.It worked on another Windows 7 machine but does not seem to work on this one.Please help me out.
pthreads, also known as POSIX threads, are a facility of POSIX-conformant operating systems (usually Unix-like systems, such as Linux and Mac OS X.) Windows does not have it. You will need to install a Windows port of pthreads. You can get it here: http://sources.redhat.com/pthreads-win32
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
How can one grab a stack trace in C?
In PHP it's debug_backtrace,is there such a function in c?
On Windows you can call the StackWalk64 function that is exported by DBGHELP.DLL. It is shipped with Debugging Tools for Windows (WinDbg) but according to this link, "The redistribution policies for these included DLLs were specifically designed to make it as easy as possible for people to include these files in their own packages and releases."