> Hi everyone,
> 
> I've been having trouble building on our local RTLinux machine for use on miniRTL 
>and hoped someone could help.  Let me explain...
> 
> During execution I find the program is executed in listed sequence irrespective of 
>the main function - if a function is listed above main it will execute (and seg fault 
>on the return) even if there is no call to it.  Putting main first in the program 
>seems to solve the problem, but I shouldn't need to do this.  I wondered whether the 
>standard startup files were not being linked, but how do I check?  I'm compiling with 
>the glibc-2.0.7 libs like this:
>       cc -Wall -nostdlib -L /usr/lib/glibc-2.0.7/ -lc -O2 $(TARGET).c -o ($TARGET) 
> 
> I'm using MiniRTL V2.3 (kernel 2.2.14-rt12.3) and rtlinux 3.0 (kernel 
>2.4.0-test1-rtl)
> 
> Any help would be much appreciated,
>
you did not link in the gcc specific "fixeup" files 
so if you do it "by hand" you need to use something like:

gcc -I/home/rtl3.0/minirtl-3.0/linux/include -I/home/rtl3.0/minirtl-3.0/include 
-I/home/rtl3.0/minirtl-3.0/include/compat  -Wall -nodefaultlibs -nostdlib 
-L/usr/lib/glibc-2.0.7 -lc -lgcc -s monitor.c -o monitor 
/usr/lib/glibc-2.0.7/extra_lib/crt1.o /usr/lib/glibc-2.0.7/extra_lib/crti.o 
/usr/lib/glibc-2.0.7/extra_lib/crtn.o

...ugly - but it should work and eliminate your problem.

hofrat


-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/

Reply via email to