Linking Linux Driver written in C with ASM module


 
Thread Tools Search this Thread
Top Forums Programming Linking Linux Driver written in C with ASM module
# 1  
Old 06-14-2011
Linking Linux Driver written in C with ASM module

Hi, I have got sample linux driver written in C.
I got also some assembly code, compiled into .o file (using as compiler).

In my Makefile I got:
PHP Code:
obj-+= someDriver.o
someDriver
-objs := CFile1.o CFile2.o ASMFile.o

default:
$(
MAKE) -$(KDIRSUBDIRS=$(PWDmodules 
Unfortunatelly I cannot import functions from ASM file to C files.
'make' says, that there is no file called: .ASMFile.o.cmd (that is true, by the way:]).

C files are normally compiled by instructions in Makefile and have matching .o.cmd files.

So do you know how to successfully link (add) ASM files into Linux Driver?

---------- Post updated at 10:36 AM ---------- Previous update was at 06:59 AM ----------

Problem solved:
it is enough to specify assembler filename in line (do not compile it on side):

PHP Code:
someDriver-objs := CFile1.o CFile2.o ASMFile.
and name that file 'ASMFile.S' - the point is to name with good extension that is big S.
Hope to help anybody.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Help with Linux linking error

Hi, Currently I am migrating codes from unix to Linux. When doing linking(ld) getting the below error. Error is :ld: invalid BFD target `--shared' Providing the script of the ld: ld -b -G -o lib/libatk.so ./src/atk_db.o ./src/atk_gcl.o ./src/atk_options.o ./src/atk_exception.o... (1 Reply)
Discussion started by: jrkar
1 Replies

2. Programming

Why am i getting these strange packets while running my packet capture module written in c.?

I have made an packet capture application running on intel machine, it is capturing packets with src address- 17.0.0.0 destination ip- 66.0.0.0, source port- 0, destination port- 0, and protocol- 0 what does these packets mean ? The code written to interpreter captured bytes is given below.... (5 Replies)
Discussion started by: arunpushkar
5 Replies

3. Programming

book on linux application written with c

Just learned c language ,but I don't know where to start to write some applications under Linux ,I really appreciate it if anybody can help me find some books or sites on it. (2 Replies)
Discussion started by: hgdcjq
2 Replies

4. Hardware

Difference between platform driver,codec driver and Machine driver

In general terms what are the differences platform driver,codec driver and Machine driver? (1 Reply)
Discussion started by: rupeshkp728
1 Replies

5. Shell Programming and Scripting

An algorithm to be written in linux command

Hi All, I wrote the following script in R. However, i can not run it. Because the data file is so big. Therefore, i need to write it in shell script. Could you please help me? ###################################### data=as.matrix(read.table("data.txt"))... (3 Replies)
Discussion started by: senayasma
3 Replies

6. Fedora

Is Kernel module is the same as a device driver?

I have been reading prep questions for my second unix academy exam, and there's a nuance, I'm not sure I understand it correctly. I've been under impression from my readings of book by Evi Nemeth and from unix academy DVDs I've been watching, that kernel's modules are drivers. I think of it, as... (25 Replies)
Discussion started by: newlinuxuser1
25 Replies

7. Linux

How to convert Linux Kernel built-in module into a loadable module

Hi all, I am working on USB data monitoring on Fedora Core 9. Kernel 2.6.25 has a built-in module (the one that isn't loadable, but compiles and links statically with the kernel during compilation) to snoop USB data. It is in <kernel_source_code>/drivers/usb/mon/. I need to know if I can... (0 Replies)
Discussion started by: anitemp
0 Replies

8. UNIX for Dummies Questions & Answers

Need Book for Linux Basics and Linux device driver.

hai friend, I am new to Linux, i need a book for Linux basic and Linux device driver .. plz send the book name and author(Easy to learn and mostly used by programmers) and also send the link if it is available in Net... Thank you. ... (0 Replies)
Discussion started by: sundar.lsr
0 Replies

9. Programming

Linking problem while linking to shared library

Hi I'm getting ld: fatal: option -h and building a dynamic executable are incompatible ld: fatal: Flags processing errors When I run ld -shared -L/usr/dt/lib -lDtSvc -o builtin.so Workspace.o after running gcc -fPIC -I/usr/X11R6/include -I/usr/dt/include -c Workspace.c I'm... (6 Replies)
Discussion started by: laho
6 Replies

10. UNIX for Advanced & Expert Users

modem driver for linux

how to get modem driver for linux on intel netvista a22p model?please help.Thanks.:( (2 Replies)
Discussion started by: xinubhaskar
2 Replies
Login or Register to Ask a Question