LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem running .o files after they are compiled from .c files in fedora core 1 (https://www.linuxquestions.org/questions/linux-newbie-8/problem-running-o-files-after-they-are-compiled-from-c-files-in-fedora-core-1-a-709509/)

Starrie 03-05-2009 08:17 PM

Problem running .o files after they are compiled from .c files in fedora core 1
 
Hi everyone! My first :newbie: post here :) (That smiley is GOOD!)

I had read the "Please READ this before posting!" sticky but still didn't find a solution so I'll try to find it here. Sorry if I still did something wrong.

I am doing some research, which requires me to compile NUSHU - passive covert channel engine for Linux 2.4 kernels(The last post in the html).
Unfortunately, it is not supported for newer kernels.:eek:


Summary of problem:
Used makefile with command "make -f Makefile", got some .o files as a result.
Changed their permissions from their properties to allow Execution.
Tried "./FILE_NAME_HERE.o" in Terminal and got:
"bash: ./FILE_NAME_HERE.o: cannot execute binary file" response.
Trying to find a way to make the program work now.:(

Processes
What I did is I installed Fedora Core 1 (not sure if it's a good idea), got the files into the system and had done the following:

1: Changed a line in "Makefile" from "KHDRS=/usr/src/linux/include" to "KHDRS=/usr/src/linux-2.4.22-1.2115.nptl/include", as the former directory doesn't exist.

2: Copied "ip.h" and "tcp.h" header files from "/usr/src/linux-2.4.22-1.2115.nptl/include/linux" to "/usr/src/linux-2.4.22-1.2115.nptl/include/net", required by some of the header files.

3: Compiled using the command "make -f Makefile", after which I get a few .o files (i.e. crypt.o, nushu_sender.o, d3des.o etc"

From manual it looks as if that's the end and the .o files are executables. I search online but didn't get much clue as to what they are :scratch:
Tried to run the .o files but they cannot be executed.


I think chances are either I did not compile the files correctly or not using the right way to run the .o files, or that it doesn't work in Fedora Core 1.
That being said, I thank anyone for their trying to help!:)

jschiwal 03-05-2009 08:24 PM

I think you need to learn about c programming, compiling and linking before researching blue pill lkm's. Also, this topic may be against LQ policy.

You don't run object files. Object files are linked to produce an executable program. Building a new kernel is different. The kernel doesn't run in the normal c environment. It lives in kernel land and programs you compile and run are in userland. The c library is different.

A kernel module has a .ko extension by convention. The .o files you have may be intermediate files used to produce a kernel module.


All times are GMT -5. The time now is 12:00 AM.