frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•1y ago
I'd like to do some statistics over the machine code gcc generates, such as a histogram of used instructions, average volatile/preserved registers usage of functions etc. For now just x86_64 SysV-ABI would be enough.

However I'm not aware of any pre-existing tool that lets me easily do this. The options I currently see are either make gcc output assembly and write a parser for the GNU Assembler format (possibly by reusing the asm-parser of the compiler-explorer project), or write a tool that reads (disassembles) object files directly using elfutils.

Any hints, prior work, further ideas, links to useful resources, or any other kind of help would be much appreciated.

Comments

baobun•1y ago
"Static analysis" should be a relevant search term. Assuming you don't need to tie the instructions back to C code then the "gcc" part seems circumstancial for implementation? I guess you might want to parse the ASM into an Abstract Syntax Tree (AST) represenation and work on that?

If you do want to tie it back to the source, this looks relevant: http://icps.u-strasbg.fr/~pop/gcc-ast.html

phafu•1y ago
For my purpose I don't need to get back to the original source, no.

The gcc part is only relevant with regards to what dialect of assembler I need to parse. If I go that route, I'd write a parser for the GNU assembler, and that would of course work with any code in that dialect, regardless from which compiler it came from (I haven't checked whether other compilers can produce GNU assembler though).

Spotify's ugly new disco ball icon accomplished its goal

https://www.businessinsider.com/spotify-disco-ball-icon-logo-app-ugly-2026-5
1•doppp•2m ago•0 comments

An Update from Cloudflare's Community Champions (Layoffs)

https://old.reddit.com/r/CloudFlare/comments/1ti4456/an_update_from_cloudflares_community_champions/
1•mmarian•2m ago•1 comments

Cold Email Roaster

https://zerohypelab.com/cold-email-roaster/
1•tbergmann•3m ago•0 comments

What Do Gödel's Incompleteness Theorems Mean?

https://www.quantamagazine.org/what-do-godels-incompleteness-theorems-truly-mean-20260518/
1•isaacfrond•5m ago•0 comments

FBI seeks US-wide access to license plate cameras, wants data in near real time

https://arstechnica.com/tech-policy/2026/05/fbi-seeks-us-wide-access-to-license-plate-cameras-wan...
1•ndsipa_pomu•5m ago•0 comments

Moving from API Operations to Business Capabilities

https://medium.com/@bpedro/moving-from-api-operations-to-business-capabilities-cbff4e08f7b7
1•bpedro•8m ago•0 comments

Parakeet Translates French Audio

https://thoth-app.com/blog/2026-05-19-parakeet-language-drift/
1•MattVePhD•12m ago•1 comments

The Many Kings Problem: Why Humans May Survive an Age of Superior AI [pdf]

https://zenodo.org/records/20281580
1•AccidentalOrder•12m ago•0 comments

LG Electronics Introduces First Native 1000Hz Full HD Gaming Monitor

https://www.lg.com/global/newsroom/news/media-entertainment-solution/lg-electronics-introduces-wo...
2•ksec•12m ago•0 comments

Why Elon Musk lost his suit against OpenAI

https://www.technologyreview.com/2026/05/18/1137488/elon-musk-suit-openai-verdict/
2•Judyrabbit•13m ago•0 comments

I built a scrubber to prevent AI from reading your secrets

1•svn-arv•17m ago•0 comments

RFC 7489 obsoleted and receivers MUST now downgrade to quarantine by default

https://www.rfc-editor.org/rfc/rfc9989.html
3•meysamazad•24m ago•0 comments

Meta Begins Laying Off 8000 Employees

https://www.nytimes.com/2026/05/19/technology/meta-layoffs-ai.html
1•andsoitis•28m ago•0 comments

Show HN: Claude Code Bundle for Bug Hunting with 574 Report Patterns

https://github.com/elementalsouls/Claude-BugHunter
1•ishqdehlvi•29m ago•0 comments

The great digital media valuation collapse

https://www.axios.com/2026/05/19/buzzfeed-media-fire-sales
2•thm•29m ago•0 comments

External Secrets Operator

https://external-secrets.io/latest/introduction/overview/
1•ankitg12•30m ago•0 comments

It used to be a beautifully imperfect world

https://user8.bearblog.dev/it-used-to-be-a-beautifully-imperfect-world/
1•James72689•30m ago•0 comments

UK needs urgent changes to survive global heating

https://www.theguardian.com/environment/2026/may/20/uk-built-for-climate-that-no-longer-exists-an...
1•andsoitis•30m ago•0 comments

A physical dial that locks your screens until you turn it back

https://miradial.com/
1•Kaljurahn•34m ago•0 comments

Join the Waitlist Mobile App

https://getstreek.com/
1•cnnadozi•35m ago•0 comments

Ambient Signifiers

https://boxesandarrows.com/ambient-signifiers/
1•tosh•36m ago•0 comments

Meta lays off ~8k employees

https://www.businessinsider.com/layoff-meta-severance-details-cobra-jobs-2026-5
2•almogo•37m ago•0 comments

SubAlert – get alerted before any subscription charges you

https://www.subalert.org
1•momolii•37m ago•1 comments

Trusted Publishing for NPM Packages

https://docs.npmjs.com/trusted-publishers/
1•Ozzie_osman•37m ago•1 comments

Investigation of unauthorized access to GitHub's internal repositories

https://xcancel.com/i/status/2056949168208552080
2•doener•39m ago•1 comments

The way you draw circles says a lot about you

https://qz.com/994486/the-way-you-draw-circles-says-a-lot-about-you
2•yzydserd•41m ago•0 comments

How to use Claude Code like you've used it for a year

https://codeaholicguy.com/2026/05/20/claude-code-guide-how-to-use-claude-code-like-youve-used-it-...
1•hoangnnguyen•42m ago•0 comments

Gemini Omni

https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-omni/
2•Lucasoato•42m ago•0 comments

Are modern mid-tier knives over-engineered or just well-made?

https://www.paragon-knives.com/
1•bgzlsxaz•45m ago•0 comments

You cannot sell AI written software

https://blog.habets.se/2026/05/You-cannot-sell-AI-written-software.html
2•marcofloriano•48m ago•2 comments