frontpage.
newsnewestaskshowjobs

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).

Automating Microsoft Edge Rewards

1•anonomity•1m ago•0 comments

Xteink's tiny e-readers are getting access to free books through Libby

https://www.theverge.com/tech/976390/xteink-x3-x4-x4-pro-e-reader-libby-plug-ins-drm-crosspoint-r...
1•sohkamyung•2m ago•0 comments

Sentinel Scan: an authorized LLM red-team audit, run by an AI agent

https://fbirds5230.github.io/sentinel-scan/
1•ventrovadev•2m ago•0 comments

Show HN: ElevenMusic Sounds, loop library that grows as other people generate

https://elevenmusic.io/sounds
1•sigvef•3m ago•0 comments

We benchmarked 5 ways to generate PDFs in Laravel

https://bladepdf.com/blog/laravel-pdf-generation-benchmark
1•bladepdf•5m ago•1 comments

Triple Product Rule of Partial Derivatives

https://en.wikipedia.org/wiki/Triple_product_rule
2•srean•10m ago•0 comments

Engineers will do anything to avoid learning from history

https://horn.gg/blog/engineers-will-do-anything-to-avoid-learning-from-history/
2•madrox•17m ago•1 comments

Anthropic shares details about how Claude's new watermarks will work

https://techcrunch.com/2026/08/15/anthropic-shares-more-details-about-how-claudes-new-watermarks-...
2•sbulaev•18m ago•0 comments

Ask HN: I created a web browser using Claude, everybody hates it

3•roschdal•20m ago•2 comments

Free personalised attachment style quiz

https://tally.so/r/0QP0lj
1•ElysiumAbove•23m ago•0 comments

Dress Rehearsal for Life; ambition, self-myth and a cheque as heavy as the world [video]

https://www.youtube.com/watch?v=Wo2_zhS1uYY
1•devrob•23m ago•0 comments

Ask HN: What is your favorite lightweight tool or CLI utility in 2026?

1•pranav_tech26•26m ago•0 comments

Early Influences of Photography on Art – Part 1

https://www.artinsociety.com/pt-1-initial-impacts.html
1•breppp•30m ago•0 comments

Calorie tracker for my Garmin watch

https://ashu1461.com/posts/a-calorie-tracker-on-my-garmin-watch/
1•ashu1461•33m ago•0 comments

ActivityPub Won by Being Boring

https://o.ee/blog/activitypub-won-by-being-boring/
4•birdculture•33m ago•0 comments

Ask HN: Anyone got a deauthentication attack script?

1•emn4tor•34m ago•0 comments

Neo: A distraction-free word processor for authors, by a wannabe author

https://github.com/hughhowey/neo
1•jasonpeacock•35m ago•1 comments

Modeling and Verification of Keeta's Consensus [pdf]

https://xescu.re/keeta-consensus.pdf
2•xescure•35m ago•1 comments

Were Touch Bar's problems software rather than hardware?

https://unsung.aresluna.org/deeper-dive-were-touch-bars-problems-software-rather-than-hardware/
1•ingve•37m ago•0 comments

Bede Liu, a digital signal processing pioneer, has died

https://spectrum.ieee.org/digital-signal-processing
14•Jimmc414•39m ago•0 comments

Why AI agents need verified identity

https://chrisbergeron.com/2026/08/11/why_ai_agents_need_verified_identity/
2•speckx•40m ago•0 comments

The Wow signal was a strong narrowband radio signal detected on August 15, 1977

https://en.wikipedia.org/wiki/Wow!_signal
13•firefax•42m ago•1 comments

Show HN: Live Claude Usage HUD for a $38 Thermalright Trofeo Vision LCD

https://github.com/christensen143/claude-trofeo-hud
2•christensen143•42m ago•0 comments

Tracking down a Zsh history data loss bug

https://michael.stapelberg.ch/posts/2026-08-09-zsh-history-truncation-bug/
2•ingve•46m ago•0 comments

Book Review: The Escape Artist

https://www.astralcodexten.com/p/your-book-review-the-escape-artist
1•paulpauper•47m ago•0 comments

No-New-Physics Consciousness

https://www.overcomingbias.com/p/no-new-physics-consciousness
4•paulpauper•47m ago•1 comments

2026 Filing Season: Preliminary Observations on IRS Performance

https://www.gao.gov/products/gao-26-109074
1•Jimmc414•48m ago•0 comments

Tyler Cowen: A Conservative Case for Liberal Immigration

https://www.thefp.com/p/tyler-cowen-conservative-case-liberal-immigration-policy
4•paulpauper•49m ago•0 comments

I wrote OSS for fun. They called it Exceptional Talent

https://ryoppippi.com/blog/2026-08-15-uk-gtv-en/
1•ryoppippi•51m ago•1 comments

U.S. Urges Apple Not to Buy Chinese Memory Chips

https://www.wsj.com/tech/apple-china-memory-chip-plan-57773a83
7•bookofjoe•56m ago•4 comments