This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: where to put __exit ?


Jon Beniston wrote:
When I try to compile a sample application the linker says :
/usr/local/lib/gcc/mlx16/3.4.0/../../../../mlx16/lib/libc.a(exit.o): undefined reference to `__exit'.
Where and how I should put the __exit function. The platform I am porting newlib to, does not have an OS yet.


This should probably go into libgloss/yourplatform.

Cheers,
JonB



Jon is correct. You can also choose to use the libnosys library (-lnosys) which simply defaults stubs for the various newlib syscalls. I have just added a stub for _exit which causes a divide by zero exception.


-- Jeff J.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]