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

Ubuntu 26.04 ("Resolute Raccoon") LTS released

https://lists.ubuntu.com/archives/ubuntu-announce/2026-April/000323.html
1•arunc•1m ago•0 comments

SLIT3 fragments orchestrate thermogenesis in brown adipose tissue

https://www.nature.com/articles/s41467-026-70310-9
1•PaulHoule•2m ago•0 comments

Phone's next speed boost may come from a magnetic jump

https://phys.org/news/2026-04-boost-strange-magnetic-rewrites-chips.html
2•benkan•2m ago•0 comments

Prax: An agent runtime that learns from past mistakes and fixes code in a loop

https://github.com/praxagent/praxagent-ai
1•steveharing1•3m ago•0 comments

Tushonka: Cultivating Soviet Postwar Taste (2010)

https://www.journal.media-culture.org.au/index.php/mcjournal/article/view/299
1•theletterf•3m ago•0 comments

Show HN: Universal Deploy – deploy Vite apps anywhere

https://vike.dev/blog/universal-deploy
1•brillout•3m ago•0 comments

LINK+ Union Catalog

https://linkencore.iii.com/iii/encore/;jsessionid=8C30815031D934FAD58626FBCD329593?lang=eng
1•so-cal-schemer•6m ago•2 comments

Sexism, hate and misogyny remain for this soccer trailblazer

https://www.cnn.com/2026/04/23/sport/marie-louise-eta-union-berlin-woman-coach-bundesliga
1•Tomte•6m ago•0 comments

You're about to feel the AI money squeeze

https://www.theverge.com/ai-artificial-intelligence/917380/ai-monetization-anthropic-openai-token...
1•quicklywilliam•7m ago•1 comments

O'Reilly for Public Libraries [video]

https://www.youtube.com/watch?v=HOsOTawdWFc
1•so-cal-schemer•8m ago•1 comments

France Keeps Breaking the Internet to Stop Piracy, Even Though It's Not Working

https://www.techdirt.com/2026/04/23/france-keeps-breaking-the-internet-to-stop-piracy-even-though...
2•hn_acker•10m ago•0 comments

Turning a Stripe subscription into a bot-buyable API

https://dialtoneapp.com/2026/april/turning-a-stripe-subscription-into-a-bot-buyable-api
1•fcpguru•12m ago•0 comments

Show HN: AgentSearch – Self-hosted search and MCP for AI agents, no API keys

https://github.com/brcrusoe72/agent-search
1•bricrusoe•13m ago•0 comments

Jazz v2: A local-first relational database

https://jazz.tools/blog/what-is-jazz
1•pegasus•13m ago•0 comments

GPT-5.5 System Card [pdf]

https://deploymentsafety.openai.com/gpt-5-5/gpt-5-5.pdf
4•craigmart•13m ago•0 comments

113 issues were identified within Rust Coreutils

https://discourse.ubuntu.com/t/an-update-on-rust-coreutils/80773
2•maxloh•14m ago•0 comments

98% of IT leaders want digital sovereignty: SUSE is making it happen

https://www.zdnet.com/article/suse-bets-its-future-on-digital-sovereignty/
2•CrankyBear•16m ago•0 comments

NASA rover adds to growing list of organic compounds detected on Mars

https://www.cbc.ca/news/science/nasa-mars-curiosity-rover-life-organic-compounds-9.7172210
3•Brajeshwar•18m ago•0 comments

Middle Eastern News Sites Are U.S. Government Propaganda Ops

https://theintercept.com/2026/04/20/pentagon-middle-eastern-news-propaganda-iran/
5•robtherobber•18m ago•0 comments

Earth's First Personal Robocar

https://www.tensor.auto/
2•probabletrain•18m ago•0 comments

Astrology information for markets now in an API

https://api.starsignal.io
2•dianahcastillo•19m ago•0 comments

The agent observability gap: what logs miss when LLMs call tools

https://www.lyuata.com/observability-gap
3•lyuata•19m ago•0 comments

How metrics are stored and queried

https://www.bitsxpages.com/p/how-metrics-are-stored-and-queried
5•agavra•21m ago•0 comments

GPT-5.5: Mythos-Like Hacking, Open to All

https://xbow.com/blog/mythos-like-hacking-open-to-all
4•rs_rs_rs_rs_rs•21m ago•0 comments

Ask HN: Demonstrating Value with the Same Tools

3•intervolz•22m ago•0 comments

Archive.today used vistor's browsers to DDoS, and modified archive contents

https://en.wikipedia.org/wiki/Wikipedia:Requests_for_comment/Archive.is_RFC_5
3•crumpled•24m ago•2 comments

Astronomers Find the Edge of the Milky Way

https://skyandtelescope.org/astronomy-news/astronomers-find-the-edge-of-the-milky-way/
4•bookofjoe•27m ago•0 comments

Everyone Wants Servers and Nobody Wants Servers

https://connectedplaces.online/reports/fr160-everyone-wants-servers-and-nobody-wants-servers/
2•speckx•27m ago•0 comments

Ronan Farrow on Sam Altman's 'unconstrained' relationship with the truth

https://www.theverge.com/podcast/911753/sam-altman-openai-ronan-farrow-new-yorker-feature-trust-l...
5•MarlonPro•28m ago•0 comments

CubeSandbox: Instant, Concurrent, Secure and Lightweight Sandbox for AI Agents

https://github.com/TencentCloud/CubeSandbox
3•maxloh•28m ago•0 comments