frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•12mo 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•12mo 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•12mo 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).

Memory godboxes could offer relief from the RAMpocalypse

https://www.theregister.com/systems/2026/05/10/memory-godboxes-could-offer-relief-from-the-rampoc...
1•beardyw•36s ago•0 comments

Nayuta Space Is Building Bellyflopping Rocket Boosters

https://www.china-in-space.com/p/nayuta-space-is-actually-building
1•JPLeRouzic•2m ago•0 comments

We asked 72 AI models which brands are best

https://peaktoken.ai/
1•svensauleau•4m ago•0 comments

Could Contact-Tracing Apps Help with the Hantavirus? Not

https://www.wired.com/story/could-contact-tracing-apps-help-with-the-hantavirus-not-really/
2•Brajeshwar•8m ago•0 comments

Fixing Dynamic Resolution Switching in Docker-steam-headless

https://blog.dera.page/posts/steam-headless-adaptive-resolution/
1•Aelorius•9m ago•0 comments

Train your AI code review instincts

https://siftly.dev/announcement
1•svensauleau•9m ago•1 comments

Want to track the apocalypse? One theory: Follow the billionaires' jets

https://www.yahoo.com/news/articles/want-track-apocalypse-one-theory-173133903.html
2•ari-burshell•10m ago•0 comments

Ranking 1k ShowHN posts by estimated merit using an LLM judge and TrueSkill

https://github.com/kouhxp/showhn-rank
1•mrkn1•14m ago•0 comments

A Deeper Dive into the Proxima Centauri Swarm

https://www.centauri-dreams.org/2026/05/09/a-deeper-dive-into-the-proxima-centauri-swarm/
1•JPLeRouzic•15m ago•0 comments

Use Boring Languages with LLMs

https://jry.io/writing/use-boring-languages-with-llms/
1•jryio•16m ago•0 comments

Oil-price bets ahead of Iran war news totalled $7B, reporting shows

https://www.reuters.com/sustainability/boards-policy-regulation/oil-price-bets-ahead-iran-war-new...
2•geox•19m ago•0 comments

WebRTC vs. MoQ by Use Case

https://webrtchacks.com/webrtc-vs-moq-by-use-case/
1•boruto•20m ago•0 comments

Ask HN: Is this the SWE workflow of the future?

5•mc-0•25m ago•0 comments

My Marstek B2500-D battery sends telemetry over plain HTTP

https://luca-becker.me/blog/marstek-b2500-cloud-crypto-broken/
1•sunbury•25m ago•0 comments

All 55,256 Slides of the War.gov/UFO Files Searchable and Linkable

https://hypergrid.systems/war.gov-ufo-viewer/?item=095-dow-uap-pr38-unresolved-uap-report-middle-...
2•keepamovin•28m ago•0 comments

A boilerplate to create a 1990s Geocities-themed website

https://github.com/sugardaddyapp/geocities-boilerplate
2•whatsupdog•28m ago•1 comments

Is There a There in Cyberspace

https://www.eff.org/pages/there-there-cyberspace
1•andsoitis•31m ago•0 comments

How To Use A Spreadsheet For Creativity

https://www.nair.sh/guides-and-opinions/communicating-your-expertise/how-to-use-a-spreadsheet-for...
1•nilirl•32m ago•0 comments

Leaving the Physical World

https://www.eff.org/pages/leaving-physical-world
2•andsoitis•34m ago•0 comments

Why the Mars Probe went off course (1999)

https://spectrum.ieee.org/why-the-mars-probe-went-off-course
1•s1291•34m ago•0 comments

A Tour of Txtar

https://rednafi.com/go/txtar/
1•begoon•35m ago•0 comments

A Declaration of the Independence of Cyberspace

https://www.eff.org/cyberspace-independence
1•andsoitis•35m ago•0 comments

Cyber.md: AI-native posture that speaks agent

https://baz.co/resources/cyber-md-ai-native-posture-that-speaks-agent
1•guysenkot•39m ago•0 comments

The Changing Role of Low-Fidelity (LoFi) Signals in the AI Era

https://techcommunity.microsoft.com/blog/microsoft-security-blog/the-changing-role-of-low-fidelit...
1•nirwandogra•39m ago•0 comments

IPic – A Match Head Sized Web-Server

https://web.archive.org/web/19991128140444/http://www-ccs.cs.umass.edu/~shri/iPic.htm
1•bananaboy•42m ago•1 comments

Ronald G. Wayne Is More Than Two Weeks at Apple

https://tedium.co/2026/03/31/ronald-g-wayne-apple-interview/
1•janandonly•44m ago•2 comments

Academic Research Skills for Claude Code

https://github.com/Imbad0202/academic-research-skills
3•arnon•46m ago•0 comments

Retainer: Autonomous agent for extended, independent operation

https://github.com/seamus-brady/retainer
1•s_brady•48m ago•0 comments

Pomotuimer – a dependency-free Pomodoro timer for your terminal

https://github.com/wtbates99/pomotuimer
1•wtbates99•51m ago•1 comments

The Telbex Kernel's Version 0.2 release is near

1•gnu779•51m ago•0 comments