Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Probably a couple hundred at most, and for common programs several dozen.


Tried it out on Debian Bullseye x86_64:

  $ objdump -w -j .text --no-show-raw-insn -d /usr/bin/emacs-gtk | egrep '^ *[0-9]+:' | awk '{print $2}' | sort | uniq | wc -l
  130

  $ objdump -w -j .text --no-show-raw-insn -d /bin/ls | egrep '^ *[0-9]+:' | awk '{print $2}' | sort | uniq | wc -l
  97

  $ objdump -w -j .text --no-show-raw-insn -d firefox-bin | egrep '^ *[0-9]+:' | awk '{print $2}' | sort | uniq | wc -l
  136


Wow thanks, this is exactly the type of comment I come to HN for.

I wonder if the numbers would change significantly for gentoo or anything compiled manually that had more knowledge of the CPU specifics?


From my fairly riced gentoo system:

  $ objdump -w -j .text --no-show-raw-insn -d /usr/lib64/firefox/firefox-bin | egrep '^ \*[0-9]+:' | awk '{print $2}' | sort | uniq | wc -l
  134
So actually, less!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: