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

NTSB pulls docket after AI recreates dead pilots' voices

https://arstechnica.com/ai/2026/05/ai-users-re-create-dead-pilots-voices-from-crash-investigation...
1•Lihh27•24s ago•0 comments

OpenAI intentionally removed Codex's visible context usage indicator

https://github.com/openai/codex/issues/23794
1•gobdovan•2m ago•0 comments

The Surprising Divide over What Counts as True

https://reason.com/2026/05/15/the-surprising-divide-over-what-counts-as-true/
1•rendx•3m ago•0 comments

DeepSeek-V4-Pro 75% off discount is now permanent

https://twitter.com/deepseek_ai/status/2057854261699195173
1•yogthos•4m ago•0 comments

JuliaMono – a monospaced font for scientific and technical computing

https://juliamono.netlify.app/
1•michaelsbradley•4m ago•0 comments

Is this what driving an F1 car feels like?

https://cameronwestland.com/is-this-what-driving-an-f1-car-feels-like/
1•camwest•5m ago•0 comments

Beautiful Monero Block Explorer, mempool.space copycat

https://monerospace.org
1•Cider9986•11m ago•0 comments

Hengefinder: Finding When the Sun Aligns with Your Street

https://victoriaritvo.com/blog/hengefinder/
1•evakhoury•13m ago•0 comments

I'm writing again (Cringely)

https://www.cringely.com/2026/05/21/im-writing-again/
1•dxs•14m ago•1 comments

Linux LPE via GRO managed-frag UAF (io_uring SEND_ZC and veth)

https://gist.github.com/lcfr-eth/2566a5cef312c94a5ff8d62fa417955f
2•Tiberium•15m ago•0 comments

No child deaths definitively linked to Covid shots, FDA says

https://www.nbcnews.com/health/health-news/no-child-deaths-definitively-linked-covid-shots-fda-sa...
6•ceejayoz•17m ago•0 comments

AI-native-founder-playbook-skills

https://github.com/Hades-HY-LI/ai-native-founder-playbook-skills
1•hades_sixy•20m ago•1 comments

AI is minting new billionaires, and workers want their share

https://restofworld.org/2026/samsung-south-korea-union-ai-profits/
5•billybuckwheat•21m ago•0 comments

you_can::turn_off_the_borrow_checker

https://docs.rs/you-can/latest/you_can/attr.turn_off_the_borrow_checker.html
2•striking•21m ago•0 comments

Private Credit Pricing: Are Prosecutors Opening Up Pandora's Box?

https://www.morningstar.com/alternative-investments/private-credit-pricing-are-prosecutors-openin...
2•petethomas•22m ago•0 comments

How Your Brain Decides What Matters

https://nautil.us/how-your-brain-decides-what-matters-1281159
3•devonnull•22m ago•0 comments

Show HN: Coder Words – An offline-first PWA word puzzle for programmers

https://7coderwords.kenamick.com/
1•p2detar•22m ago•0 comments

AI keeps inventing fake cases. Lawyers keep citing them

https://www.scientificamerican.com/article/why-lawyers-keep-citing-fake-cases-invented-by-ai/
5•voxadam•26m ago•0 comments

Models.dev: open-source database of AI model specs, pricing, and capabilities

https://github.com/anomalyco/models.dev
8•maxloh•26m ago•0 comments

Kommodo.ai Covered by Indiehackers

https://www.indiehackers.com/post/tech/pivoting-to-reach-a-wider-audience-and-hitting-a-5-figure-...
1•KommodoAI•28m ago•2 comments

Show HN: Datapoint AI – Make Something People Want, but Ask Them First

https://trydatapoint.com
3•yoloakki•29m ago•2 comments

China: What I Learned from the AI Labs, Robotics Startups and Academia

https://matthewdwhite.substack.com/p/eight-days-in-china-what-i-learned
3•rmason•30m ago•0 comments

Show HN: Slophunt.ai – Come post your vibe coded projects

https://slophunt.ai/
1•0x10ca1h0st•30m ago•0 comments

Show HN: Go Deep into Code

https://codeep.dev/
1•VladoIvankovic•30m ago•0 comments

PowerDNS Authoritative and LMDB and Lightning Stream / SLAC2026 / German [pdf]

https://www.heinlein-support.de/sites/default/files/media/documents/2026-05/SLAC2026_Authoritativ...
1•_bernd•31m ago•0 comments

DHS: Immigrants have to go back for Consular Processing

https://xcancel.com/DHSgov/status/2057817233200418837
3•dzonga•32m ago•0 comments

Show HN: OpenRig – a control plane for multi-agent coding topologies

https://www.openrig.dev/
1•mschwarz•34m ago•1 comments

LimeWire re-emerges in rush to share pulled 60 Minutes segment

https://arstechnica.com/tech-policy/2025/12/yo-what-limewire-re-emerges-in-online-rush-to-share-p...
3•rickcarlino•35m ago•1 comments

The Bicameral Mind, the Voice of God, & the Terrifying Origin of Consciousness

https://www.philosopheasy.com/p/julian-jaynes-the-bicameral-mind
3•dsego•35m ago•3 comments

Agentic-Agile: Why Agent Development Needs Agile (Not Just Prompts)

https://developer.microsoft.com/blog/agentic-agile-why-agent-development-needs-agile-not-just-pro...
3•ibobev•39m ago•0 comments