<Drup>
hannes: I asked pierre to add a tool/option to give the contribution of each archive in the total size of a binary, he said it could be done but it was complicated with inlining.
mort___ has quit [Quit: Leaving.]
rgrinberg has joined #mirage
insitu has joined #mirage
<hannes>
Drup: it is possible to reverse it using nm..
<hannes>
but thx, having it available at the higher level would certainly ease counting
<Drup>
hannes: can you really ?
<hannes>
run nm on all objects beforehand, list for each symbol their size (and dependent symbols)
<hannes>
then run nm on the statically linked binary, and lookup all symbols, sum up the sizes
<Drup>
hum, you could automate that
<hannes>
does _not_ work if the linker smashes symbol names (but I don't think it does that)
<hannes>
yes!
<hannes>
in <50 lines of shell :)
<Drup>
it would give better results than what you currently do
<hannes>
yes
<hannes>
you could also write a heuristic mapping symbol name to a module, and thus record module sizes
<Drup>
wouldn't you have issues with C symbols ?
<hannes>
heuristic.. C libs (symbols+nm should work) are best treated as a blob ;)
<Drup>
(btw, you seem to make the assumption that re is big (and that astring is smaller), did you checked ?
<hannes>
I'm also curious whether any of the ELF libs in OCaml would be useful here.. rather than screenscraping the nm output
<hannes>
Drup: i never said so. I'm only allergic to regular expressions (and mirage-runtime already has a depedency on astring)
insitu has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Drup>
right, the post seemed to implied that it was for size reasons