git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git binary size...

From
CHCoywolf Qi Hunt <coywolf@gmail.com>
Date
Jan 12, 2006, 10:15 UTC
Message-ID
<2cd57c900601120215pdb5da27l@mail.gmail.com>
In-Reply-To
<Pine.LNX.4.64.0601111134560.5073@g5.osdl.org>
2006/1/12, Linus Torvalds <torvalds@osdl.org>:
Show 14 quoted lines
>
>
> On Wed, 11 Jan 2006, Andreas Ericsson wrote:
> >
> > strip:
> >       strip $(PROGRAMS)
> >
> > install: strip
>
> Well, that ends up shaving some more from the binaries, but at a much
> bigger cost than just removing "-g".
>
> With stripped binaries, you can't really do _anything_. You get a
> core-file, and you're screwed.
Are you sure?

gemini:~> file `which mke2fs` /sbin/mke2fs: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, dynamically linked (uses shared libs), stripped

gemini:~> file /lib/libext2fs.so.2 /lib/libext2fs.so.2: symbolic link to `libext2fs.so.2.4'

gemini:~> file /lib/libext2fs.so.2.4 /lib/libext2fs.so.2.4: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped

In gdb:

No symbol table is loaded. Use the "file" command. (gdb) bt #0 0xb7f16445 in ext2fs_mark_generic_bitmap () from /lib/libext2fs.so.2 #1 0xb7f110ed in ext2fs_reserve_super_and_bgd () from /lib/libext2fs.so.2 #2 0xb7f18353 in ext2fs_initialize () from /lib/libext2fs.so.2 #3 0x0804b461 in ?? () #4 0xbf84b9ad in ?? () #5 0x00000000 in ?? ()

So with stripped binary, I still get the backtrace to locate the buggy function. IMO, Debian packages are build with -g.

So I suggest to let git go with `-g and striped' like all other packages do.

And if we use gnu autoconf, which provides site config ability, we could easily get (1) "-g, striped" for distros, (2) "not striped" for Linus and (3) "-g3, -O0, no striped" for some git developers.

To make git not tight to Linux, but cross platform, consider autoconf.
>
> With non-stripped binaries you can at least see the function the SIGSEGV
> happened in, and you usually even get a half-way decent backtrace etc.
>
False, see above.
>                 Linus
If I missed something in Debian, correct me.

-- Coywolf Qi Hunt

Previous: H. Peter AnvinNext: Andreas Ericsson
Message 10 of 18 in “git binary size...”
  1. Linus TorvaldsJan 11, 2006
  2. Andreas EricssonJan 11, 2006
  3. H. Peter AnvinJan 11, 2006
  4. Andreas EricssonJan 11, 2006
  5. H. Peter AnvinJan 11, 2006
  6. Andreas EricssonJan 11, 2006
  7. Junio C HamanoJan 11, 2006
  8. Linus TorvaldsJan 11, 2006
  9. H. Peter AnvinJan 11, 2006
  10. Coywolf Qi HuntJan 12, 2006
  11. Andreas EricssonJan 12, 2006
  12. H. Peter AnvinJan 12, 2006
  13. Linus TorvaldsJan 12, 2006
  14. Johannes SchindelinJan 12, 2006
  15. Linus TorvaldsJan 12, 2006
  16. H. Peter AnvinJan 12, 2006
  17. Jon LoeligerJan 20, 2006
  18. Linus TorvaldsJan 12, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.