SemiOT: Mourning for Classic Computing

From: Eric J. Korpela <korpela_at_ssl.berkeley.edu>
Date: Thu Aug 23 10:55:06 2001

> I did
>
> #include <stdlib.h>
>
> int main(void) { return(EXIT_SUCCESS); } /* [1] */
>
> A static link made a binary of 435,031 bytes, and dynamically linking is
> around 3k (using the default options). So that's the overhead (at least
> under RedHat 5.2).
>
> -spc (Still a bit large to me ... )

Given that you are still linking in ctr0.o and libc, it's not surprising
that it's huge. I'd suggest the following steps... Rename main() to start().
Compile the C to assembly (-S option to gcc). Edit the assembly file to
remove all the unnecessary stuff. Assemble the file using "as". Link the
object using "ld".

Eric
Received on Thu Aug 23 2001 - 10:55:06 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:33:34 BST