Well, the last is the standard C library of course. The two before that are security libraries that can interpret funky new types of file permissions. I'm not sure what the first one is for.
I think librt is POSIX.1b, the Real Time stuff, with good things like aios and semaphores.
I must say I can't imagine why it's so large.
OTOH, when your PDP-11 will fit 10,000 times over into your video RAM, maybe a mere one or two orders of magnitude bloat seems more forgiveable? Or not.
Hey, man, that PDP-11 image just about fits in L1 cache nowadays. I guess the disk was about the scale of L3. RAM is the new tape. Now that's an interesting thought....
You are comparing 2 totally different things : a file size vs size of the core memory of the PDP. Also, a file size is not a good hint about what will the process memory footprint be.
If you want to compare file sizes, in that case ls is OK, but you still need to maybe check for the symbol table size too, or check the executable different section sizes.
In the later case, run "size" on your a.out to get the size of the text and data sections. Regarding the share libs, you should recompile ls with -static (or something like this) to get the correct size.
Here are the numbers for PDP11 Unix V7 :
# ls -l /bin/ls -rwxr-xr-x 1 bin 8072 Jun 8 1979 /bin/ls # size /bin/ls 7296+760+3840 = 11896b = 027170b
Man says :
Size prints the (decimal) number of bytes required by the text, data, and bss portions, and their sum in octal and decimal, of each object-file argument. [...]
You may also take into account that the PDP11 "complex" addressing modes may allows shorter programs than nowadays 32 bits RISC instruction set.
Comments 4
Reply
I must say I can't imagine why it's so large.
OTOH, when your PDP-11 will fit 10,000 times over into your video RAM, maybe a mere one or two orders of magnitude bloat seems more forgiveable? Or not.
Hey, man, that PDP-11 image just about fits in L1 cache nowadays. I guess the disk was about the scale of L3. RAM is the new tape. Now that's an interesting thought....
Reply
If you want to compare file sizes, in that case ls is OK, but you still need to maybe check for the symbol table size too, or check the executable different section sizes.
In the later case, run "size" on your a.out to get the size of the text and data sections. Regarding the share libs, you should recompile ls with -static (or something like this) to get the correct size.
Here are the numbers for PDP11 Unix V7 :
# ls -l /bin/ls
-rwxr-xr-x 1 bin 8072 Jun 8 1979 /bin/ls
# size /bin/ls
7296+760+3840 = 11896b = 027170b
Man says :
Size prints the (decimal) number of bytes required by the
text, data, and bss portions, and their sum in octal and
decimal, of each object-file argument. [...]
You may also take into account that the PDP11 "complex" addressing modes may allows shorter programs than nowadays 32 bits RISC instruction set.
Reply
text data bss dec hex filename
88264 908 1132 90304 160c0 /bin/ls
hendrik@lovesong:~$
It looks as if a lot if it *is* code.
- hendrik
Reply
Leave a comment