> I would make the remark that C doesn't have modules. After
> compiling the code type information is lost and you can link
> to anything that will resolve a name. For example I can treat
> the name qsort(3) as an array of integers. The loader will resolve
> the name qsort and the code in main will just do what I told it to.
now fixed on plan 9:
% cat x.c
#pragma lib "libc.a"
extern int qsort[];
extern int print(char*, ...);
void
main(void)
{
int i;
for(i=0; i<10; i++)
print("%08ux\n", qsort[i]);
}
% 8c -T x.c
% 8l x.8
qsorts: incompatible type signatures b3a1d3d5(x.8) and
c7dcac09(/386/lib/libc.a(qsort)) for qsort
%