[Date Prev][Date Next] [Chronological] [Thread] [Top]

[rtl] problems with linking



hi all

I some problem in linking...if I want to run a real time progam which is
make up of two files...how can I complie and link it to run in rtlinux?

t.c - the real time linux progam module...with all the rt_task_init stuff
func.c - the real time task function (just a printk statement)

I then use gcc -g -c with the flags D__KERNEL__ and D__RT__ to complie and
generated two object files (.o) .

then I try to link it with ld, but it says

ld: warning: cannot find entry symbol _start; defaulting to 08048074
t.o: In function `init_module':
/home/wangsg/linktest/t.c:25: undefined reference to `printk'
/home/wangsg/linktest/t.c:28: undefined reference to `rt_task_init'
/home/wangsg/linktest/t.c:32: undefined reference to `rt_get_time'
/home/wangsg/linktest/t.c:32: undefined reference to
`rt_task_make_periodic'
t.o: In function `cleanup_module':
/home/wangsg/linktest/t.c:40: undefined reference to `printk'
/home/wangsg/linktest/t.c:41: undefined reference to `rt_task_delete'
func.o: In function `fun':
/home/wangsg/linktest/func.c:8: undefined reference to `printk'

can anybody help me to get it run in rtlinux?

Thomas


   MM         MM                                                   
   MMMM     MMMM           Thomas Ng                           
   MM  MM MM  MM           E-mail: thomasng@umich.edu                
   MM   MMM   MM           URL: www-personal.umich.edu/~thomasng
   MM    M    MM       
     Wolverine         


--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.cs.nmt.edu OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.cs.nmt.edu
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/