"size" of relocatable objects

Alan Modra amodra@bigpond.net.au
Tue May 22 01:34:00 GMT 2007


Someone at IBM noticed that "size" ignores common variables in
relocatable object files, and wondered whether we could enhance "size"
to show them.  Well, of course we can, but should we?  Opinions?

I'm inclined to say "just use awk".

objdump -t some_file.o | grep '\*COM\*' | \
  awk '{ com += strtonum ("0x" $1) } END { print com; }'

However, many people don't have even my feeble awk skills..

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list