[TUHS] screen editors
Derek Fawcus
dfawcus+lists-tuhs at employees.org
Wed Jan 8 07:20:13 AEST 2020
On Tue, Jan 07, 2020 at 03:45:24PM -0500, Chet Ramey wrote:
> On my Mac OS X machine, it's about ten times smaller than vim
>
> $ size /usr/local/bin/ce
> __TEXT __DATA __OBJC others dec hex
> 114688 339968 0 4295024640 4295479296 10007d000
> $ size /usr/bin/vim
> __TEXT __DATA __OBJC others dec hex
> 1687552 176128 0 4295016448 4296880128 1001d3000
>
> Similar numbers on RHEL 7, but due to the large bss, it's only about
> 45% smaller than vim.
So I got curious about those large numbers on the mac, and made use of 'otool -l'.
It would seem that the values for __DATA reported by size correspond to the overall
size of the 'load command' for the __DATA segment, and so includes bss as well.
$ ls -l /usr/bin/vim
-rwxr-xr-x 1 root wheel 1530064 29 Jun 2018 /usr/bin/vim
So 'size' on the mac is not so useful, but 'size -m /usr/bin/vim' gives
information from which one could derive the normal 'size' output.
$ size -m /usr/bin/vim
Segment __PAGEZERO: 4294967296
Segment __TEXT: 1388544
Section __text: 1271745
Section __stubs: 1044
Section __stub_helper: 1756
Section __cstring: 85892
Section __const: 14672
Section __unwind_info: 8944
total 1384053
Segment __DATA: 155648
Section __got: 1056
Section __nl_symbol_ptr: 16
Section __la_symbol_ptr: 1392
Section __const: 38608
Section __data: 64432
Section __bss: 42520
Section __common: 5720
total 153744
Segment __LINKEDIT: 36864
total 4296548352
DF
More information about the TUHS
mailing list