3 ms·
Another good reason: $ ldd /bin/nano linux-vdso.so.1 (0x00007ffc72add000) libmagic.so.1 => /usr/lib64/libmagic.so.1 (0x00007f3eca793000) libncursesw.so.5
by noobermin 10y ago
Another good reason:
$ ldd /bin/nano
linux-vdso.so.1 (0x00007ffc72add000)
libmagic.so.1 => /usr/lib64/libmagic.so.1 (0x00007f3eca793000)
libncursesw.so.5 => /lib64/libncursesw.so.5 (0x00007f3eca52b000)
libc.so.6 => /lib64/libc.so.6 (0x00007f3eca193000)
libz.so.1 => /lib64/libz.so.1 (0x00007f3ec9f73000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f3ec9d6b000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3eca9bb000)
$ ldd /usr/bin/vim
linux-vdso.so.1 (0x00007ffd69bfd000)
libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007efe2d7d3000)
libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007efe2d5b3000)
libXt.so.6 => /usr/lib64/libXt.so.6 (0x00007efe2d33b000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007efe2cfdb000)
libm.so.6 => /lib64/libm.so.6 (0x00007efe2cceb000)
libncurses.so.5 => /lib64/libncurses.so.5 (0x00007efe2ca8b000)
libacl.so.1 => /lib64/libacl.so.1 (0x00007efe2c87b000)
libgpm.so.1 => /lib64/libgpm.so.1 (0x00007efe2c673000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007efe2c46b000)
libc.so.6 => /lib64/libc.so.6 (0x00007efe2c0d3000)
libuuid.so.1 => /lib64/libuuid.so.1 (0x00007efe2becb000)
libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007efe2bca3000)
libattr.so.1 => /lib64/libattr.so.1 (0x00007efe2ba9b000)
/lib64/ld-linux-x86-64.so.2 (0x00007efe2d9e3000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007efe2b893000)
libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007efe2b68b000)
There probably are stripped down versions of vim out there, but this makes nano more reliable in the case of say a corrupted disk where libs are corrupted...less points of failure at least.
- nickysielicki 10y agoI think it's a bit more fair to compare it to vi or nvi $ ldd $(which nvi) /usr/local/bin/nvi: Start End Type Open Ref GrpRef Name 0000047a80c00000 0000047a8106c000 exe 1 0 0 /usr/local/bin/nvi 0000047d4d9f6000 0000047d4de50000 rlib 0 1 0 /usr/lib/libncursesw.so.14.0 0000047c97a14000 0000047c97e20000 rlib 0 1 0 /usr/lib/libutil.so.12.1 0000047ca1ba9000 0000047ca2073000 rlib 0 1 0 /usr/lib/libc.so.88.0 0000047d3bf00000 0000047d3bf00000 rtld 0 1 0 /usr/libexec/ld.so $ ldd $(which vi) /usr/bin/vi: Start End Type Open Ref GrpRef Name 0000106784500000 0000106784956000 exe 1 0 0 /usr/bin/vi 00001069ee8ed000 00001069eed47000 rlib 0 1 0 /usr/lib/libcurses.so.14.0 00001069f097f000 00001069f0d8b000 rlib 0 1 0 /usr/lib/libutil.so.12.1 00001069a8f41000 00001069a940b000 rlib 0 1 0 /usr/lib/libc.so.88.0 0000106a02600000 0000106a02600000 rtld 0 1 0 /usr/libexec/ld.so
- synchronise 10y agoOne thing I found interesting: $ ldd /usr/bin/ne linux-vdso.so.1 => (0x00007ffc22abf000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1c2d4ee000) libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f1c2d2c5000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1c2ceff000) /lib64/ld-linux-x86-64.so.2 (0x00007f1c2d7ff000) For a pretty full featured text editor ne has surprisingly few dependencies.
- bcook 10y agoIs your "vim" actually "gvim"? On ArchLinux I get the following: ldd /usr/bin/vim linux-vdso.so.1 (0x00007ffdcebf9000) libm.so.6 => /usr/lib/libm.so.6 (0x00007f1a49617000) libncursesw.so.6 => /usr/lib/libncursesw.so.6 (0x00007f1a493aa000) libacl.so.1 => /usr/lib/libacl.so.1 (0x00007f1a491a1000) libgpm.so.2 => /usr/lib/libgpm.so.2 (0x00007f1a48f9a000) libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f1a48d96000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f1a48b79000) libc.so.6 => /usr/lib/libc.so.6 (0x00007f1a487d8000) /lib64/ld-linux-x86-64.so.2 (0x00007f1a4991b000) libattr.so.1 => /usr/lib/libattr.so.1 (0x00007f1a485d3000)
- justinmk 10y agoHere's neovim: $ ldd $(which nvim) linux-vdso.so.1 => (0x00007fff75590000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f821b0ea000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f821aecc000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f821acc7000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f821a9c1000) libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f821a7be000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f821a3f8000) /lib64/ld-linux-x86-64.so.2 (0x00007f821b301000)
- noobermin 10y agoThis is on gentoo, so it looks like I have X, acl, and gpm use flags set for vim, which are a weak correspondence to configure options. So, I'm assuming you can remove SM,ICE,Xt,X11...gpm,acl,xcb,Xau,Xdcmp from my list. Quite a reduction! I admit. To be fair, nano can remove magic, ncurses which cuts it down to libc, libz for nano, and libm, libattr, libc, and ncurses for vim. I'm assuming you might be able to remove ncurses for vim(?) by configure? I've never built vim by hand. So you might be right, the stripped out version makes a difference.
- paulannesley 10y agoThe ones that ship with OS X 10.11: $ otool -L /usr/bin/nano /usr/bin/nano: /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1225.0.0) $ otool -L /usr/bin/vim /usr/bin/vim: /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0) /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
- GFK_of_xmaspast 10y agoIf seems to me that if you're in a situation where you have to worry about working on a corrupted FS where parts of /usr/lib and /lib may or may not be reliable, thats about the time when you say 'screw it' and restore from backups.
- sundarurfriend 10y agoGlad I'm not the only one that thought that. This sounds to me like comparing kitchen cabinets based on "which one might work best when your house is on fire".