frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Kill SWITCH AGENDA: You'll own your car – until the government AI says you don't

https://www.theblaze.com/align/kill-switch-agenda-youll-own-your-car-until-the-governments-ai-say...
1•bilsbie•40s ago•0 comments

Am I an LLM?

https://www.arturonereu.com/articles/am-i-an-llm/
1•ArturoNereu•54s ago•0 comments

Registry mirror authentication with Kubernetes secrets

https://www.cncf.io/blog/2026/03/09/registry-mirror-authentication-with-kubernetes-secrets/
1•ankitg12•1m ago•0 comments

NERC Issues Level 3 Alert re: computational loads

https://www.nerc.com/newsroom/nerc-issues-level-3-alert-reliability-guideline-focused-on-large-lo...
1•sehugg•1m ago•0 comments

Practical Decentralization

https://www.pfrazee.com/blog/practical-decentralization
1•rzk•2m ago•0 comments

The Boring Internet

https://www.terrygodier.com/the-boring-internet
1•cdrnsf•3m ago•0 comments

#010: Designers Are Having Fun. Again

https://metedata.substack.com/p/010-designers-are-having-fun-again
1•young_mete•3m ago•0 comments

On Benchmarking

https://planetscale.com/blog/on-benchmarking
1•logickkk1•3m ago•0 comments

The .10x Engineer

https://www.dgrcode.com/blog/.10x
1•dgrcode•4m ago•0 comments

VS Code Update Added Copilot as Default Co-Author to Git Commits

https://www.heise.de/en/news/WTF-Microsoft-forces-Co-Authored-by-Copilot-in-commits-11279554.html
1•m463•4m ago•0 comments

How much history should there be in science education?

https://www.chemistryworld.com/opinion/how-much-history-should-there-be-in-science-education/4023...
1•ano-ther•5m ago•0 comments

AI agent's confession: 'I violated every principle I was given'

https://www.theguardian.com/technology/2026/apr/29/claude-ai-deletes-firm-database
1•hermitcrab•5m ago•0 comments

OpenAI appears to be fast-tracking its first AI agent phone

https://twitter.com/mingchikuo/status/2051523855286776034
1•eternalreturn•6m ago•0 comments

PayPal plans job cuts as its new CEO pursues turnaround strategy

https://www.businesstimes.com.sg/companies-markets/banking-finance/paypal-plans-job-cuts-its-new-...
1•mgh2•7m ago•0 comments

Juno

https://jsoftware.github.io/juno/app/
2•tosh•8m ago•0 comments

Show HN: StackPort – Open-source visual browser for LocalStack/AWS emulators

https://github.com/DaviReisVieira/stackport
1•davireis•8m ago•0 comments

When Knowledge Becomes Control

https://dylanconlin.com/blog/when-knowledge-becomes-control/
1•dconlin•9m ago•0 comments

Minimum Viable Agent Security

https://www.iron.sh/blog/minimum-viable-agent-security
2•mslipper•9m ago•0 comments

Treat your coding agents like developers

https://finbarr.site/2026/05/05/treat-your-coding-agents-like-developers.html
4•Finbarr•10m ago•1 comments

The Last Human-Written Paper: Agent-Native Research Artifacts

https://arxiv.org/abs/2604.24658
2•amberjcjj•10m ago•0 comments

AI for Qualitative Research:Why AI Is a Tool for Researchers, Not the Researcher

https://figshare.com/articles/journal_contribution/AI_for_Qualitative_Research_Why_AI_Is_a_Tool_f...
3•aishasajjad•11m ago•0 comments

Why is Cloudflare protecting the DDoS'er (beamed.st) attacking Ubuntu servers?

https://infosec.exchange/@mttaggart/116518022621367937
7•mystraline•11m ago•0 comments

How AI-Powered Asynchronous Digital Research Is Transforming Healthcare

https://figshare.com/articles/preprint/Real-Time_Patient_Narratives_How_AI-Powered_Asynchronous_D...
2•aishasajjad•13m ago•0 comments

Show HN: An interactive AI tutorial I wrote for my 11-year-old

https://learnai.robennals.org/
3•robotelvis•13m ago•0 comments

Why the AI backlash has turned violent

https://www.bloodinthemachine.com/p/why-the-ai-backlash-has-turned-violent
3•speckx•14m ago•0 comments

Hyphanet: High Impact Tasks

https://github.com/hyphanet/wiki/wiki/High-Impact-tasks
3•jerlendds•15m ago•0 comments

Trustworthy JavaScript for the Open Web

https://hacks.mozilla.org/2026/05/trustworthy-javascript-for-the-open-web/
2•panarky•16m ago•0 comments

China Steps Up U.S. Sanctions Fight, Defying Blacklisting over Iranian Oil

https://www.wsj.com/world/china/china-steps-up-u-s-sanctions-fight-defying-blacklisting-over-iran...
2•LopRabbit•16m ago•0 comments

How I organize my work

https://www.krabr.com/blog/how-i-organize-my-work/
2•alexey358•17m ago•0 comments

Show HN: Per-request emotion steering for vLLM, with batching preserved

https://github.com/eigenweltlabs/emotion-steering
1•ChrisPoensgen•18m ago•0 comments