Newsgroups: comp.sys.acorn
Path: utzoo!utgpu!watserv1!watdragon!rose!ccplumb
From: ccplumb@rose.uwaterloo.ca (Colin Plumb)
Subject: Re: C versus ARM take 2
Message-ID: <1991Feb25.141407.10162@watdragon.waterloo.edu>
Sender: daemon@watdragon.waterloo.edu (Owner of Many System Processes)
Organization: University of Waterloo
References: <807@utrcu1.UUCP> <033143.8965@timbuk.cray.com>
Date: Mon, 25 Feb 1991 14:14:07 GMT
Lines: 17

lord@sequoia.cray.com (Steven Lord) wrote:
>This is not a function of the compiler or the linker, it is the way the C
>library is organised.
>
>The library is basically an archive of
>relocatable object code files, the linker looks through it and pulls in the
>object files it needs to fulfill all the unresolved references in your code.

This is not necessarily true; a more intelligent linker (heck, even the Unix
linker can do this) only pulls in the necessary functions and ignores the
file boundaries.  But still, printf() usually calls an underlying _doprnt()
which calls putchar() which calls _flsbuf() and maintains an output buffer...
plus, there is start-up code to initialize the buffer.

Use write() in Unix, or OS_Write0 on the Archimedes if you want small code.
-- 
	-Colin
