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

SpaceX spending on Starship tops $15B in rush for airline-like rocketry

https://www.reuters.com/business/autos-transportation/spacex-spending-starship-tops-15-billion-ru...
1•bilsbie•51s ago•0 comments

Publishers Demand Accountability from Common Crawl over Unauthorized Use

https://www.newsmediaalliance.org/nma-letter-to-common-crawl/
1•thm•1m ago•0 comments

Ask HN: How do you self-host your apps?

1•blindlobstar•1m ago•0 comments

Without warning, Germany ordered Lexus to remotely shut down the remote-start

https://twitter.com/redpillb0t/status/2050052552948175265
1•bilsbie•3m ago•0 comments

AI commerce needs an MLPerf – early attempt at one

https://ucpchecker.com/blog/ucp-playground-evals
1•benjifisher•4m ago•0 comments

The Productivity Panic Is Your Problem Now

https://stratechgist.com/p/the-productivity-panic-is-your-problem
1•bartdegoede•8m ago•0 comments

Hallucinated citations are polluting the scientific literature. What can be done

https://www.nature.com/articles/d41586-026-00969-z
1•b-man•8m ago•0 comments

Android VPN IP Leak Even If Always-On VPN Enabled

https://lowlevel.fun/posts/tiny-udp-cannon-android-vpn-bypass/
4•birdculture•9m ago•0 comments

The Rise of the High-Range, Less Expensive E.V

https://www.nytimes.com/2026/04/27/upshot/cheap-electric-cars-gas-prices.html
2•TheWeiHu•9m ago•1 comments

Elon Musk's A.I. Claims of Danger Face Limits in OpenAI Trial

https://www.nytimes.com/2026/04/30/technology/openai-trial-elon-musk-existential.html
1•1vuio0pswjnm7•9m ago•0 comments

An Ode to Inconsolation

https://terminaltrove.com/blog/an-ode-to-inconsolation/
1•diazc•10m ago•0 comments

Abaxx Announces Release of Open-Source Library for Agentic Identity: Agents++

https://investors.abaxx.tech/press-releases/abaxx-announces-the-formation-of-abaxx-labs-and-the-r...
1•mdhen•10m ago•1 comments

Herb Sutter: What C++26 Means for Production Systems [video]

https://www.youtube.com/watch?v=Qvr9MTAU_y4
1•KnuthIsGod•11m ago•0 comments

For first time since World War II, US national debt now larger than its economy

https://fortune.com/2026/04/30/national-debt-larger-than-economy-gdp-ratio-100-percent/
2•Geekette•12m ago•0 comments

Juan Alday: Why C++ Wins in Finance [video]

https://www.youtube.com/watch?v=InLxLEqg_fs
1•KnuthIsGod•12m ago•0 comments

Dreams – A New Social Media Network

1•code1234567890•13m ago•0 comments

California billionaire tax proposal attracts 1.5M signatures

https://www.latimes.com/business/story/2026-04-30/what-to-know-about-california-billionaire-tax-p...
3•1vuio0pswjnm7•14m ago•0 comments

Public consultation should begins on plans to transform the moon and Mars

https://www.theguardian.com/commentisfree/2026/may/01/artemis-moon-mars
1•giuliomagnifico•15m ago•0 comments

D. B. Cooper

https://en.wikipedia.org/wiki/D._B._Cooper
1•chistev•16m ago•0 comments

Gašper Ažman: How C++26 Rethinks Concurrency and Execution [video]

https://www.youtube.com/watch?v=A13jJXW74xQ
1•KnuthIsGod•16m ago•0 comments

Vatican Observatory has asteroid named after Pope Leo XIII

https://www.vaticannews.va/en/vatican-city/news/2026-05/vatican-observatory-astronomy-asteroids-p...
1•thinkingemote•19m ago•0 comments

Running Adobe's 1991 PostScript Interpreter in the Browser

https://www.pagetable.com/?p=1854
7•ingve•23m ago•1 comments

Ask HN: How do you detect breaking API changes in CI?

1•coffeecoderr•24m ago•0 comments

Sanders splits with Washington on AI arms race with China

https://www.axios.com/2026/04/30/bernie-sanders-ai-arms-race-china
1•1vuio0pswjnm7•27m ago•1 comments

NHS Goes to War Against Open Source

https://shkspr.mobi/blog/2026/05/nhs-goes-to-war-against-open-source/
4•edent•28m ago•1 comments

Silicon Valley Is Bracing for a Permanent Underclass

https://www.nytimes.com/2026/04/30/opinion/ai-labor-work-force-silicon-valley.html
2•thm•28m ago•0 comments

'Rogue' Cursor AI agent loses control and wipes company's database

https://abcnews.com/GMA/News/rogue-ai-agent-haywire-tech-company-ceo-bullish/story?id=132473181
4•01-_-•31m ago•2 comments

'We Know You Live Right Here': No Secrets in America's New Surveillance Dragnet

https://www.wsj.com/politics/policy/immigration-ice-arrests-surveillance-6f1cef64
3•impish9208•31m ago•1 comments

Show HN: Git-issues – Issue tracker that lives in your repo as Markdown

https://steviee.github.io/git-issues/
1•steviee•37m ago•2 comments

Why does it take so long to release black fan versions? (Noctua)

https://www.noctua.at/en/expertise/blog/how-can-it-take-so-long-to-release-black-fan-versions
1•Tiberium•38m ago•0 comments