[En-Nut-Discussion] Granularity of the libraries

Harald Kipp harald.kipp at egnite.de
Tue Sep 7 22:58:32 CEST 2004


Hi Ole,

the linker loads complete modules to the code. A module
is an object file. If the code references NutThreadYield()
for example, then thread.o is linked to the code.

I do not think it is possible to run single threaded Nut/OS
libs without rewriting at least most of the device driver
stuff. While multithreading is based on blocking, single
threaded is based on polling, which is a completely
different concept.

Nevertheless, there may be modules, which can be split.
One thing is even worse. When writing pure UDP apps, TCP
will be linked in anyway.

Harald


At 12:18 07.09.2004 +0200, you wrote:
>Hello,
>
>as I don't know how smart the linker works (e.g. removing unneded code
>from the target binary file) I would suggest to change the makefiles a
>little bit to get a finer granularity of libraries. If we could split
>the libnutdev.a into more but smaler libraries or even don't use a
>library at all I think one could save a lot of program space memory.
>Perhaps one could do so with the whole system? I would like to be able
>to use the libnutdev.a in a program that does not need threading but
>AFAIK libnutdev.a depends on different other libraries too...
>
>Any suggestions?
>
>Regards,
>
>Ole Reinhardt
>--
>kernel concepts    Tel: +49-271-771091-14
>Dreisbachstr. 24   Fax: +49-271-771091-19
>D-57250 Netphen    E+ : +49-177-7420433
>--
>
>
>_______________________________________________
>En-Nut-Discussion mailing list
>En-Nut-Discussion at egnite.de
>http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion




More information about the En-Nut-Discussion mailing list