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

Learning, Fast and Slow: Towards LLMs That Adapt Continually

https://gepa-ai.github.io/gepa/blog/2026/05/11/learning-fast-and-slow/
1•LakshyAAAgrawal•4m ago•0 comments

A New Kind of Family-Separation Crisis

https://www.theatlantic.com/politics/2026/05/honduras-deportations-without-children/687153/
2•paulpauper•4m ago•0 comments

I Was Drowning Running 14 Markets Alone. So I Built a $0.41/Day AI Employee

https://medium.com/@alanscottencinas/i-was-drowning-running-14-markets-alone-so-i-built-a-0-41-da...
1•encinas88•4m ago•0 comments

State media control influences large language models

https://www.nature.com/articles/s41586-026-10506-7
1•paulpauper•5m ago•0 comments

What I've Been Reading

https://marginalrevolution.com/marginalrevolution/2026/05/what-ive-been-reading-288.html
2•paulpauper•5m ago•0 comments

THORChain exploit hits Bitcoin, Ethereum, and BSC: Hackers steal over $10M

https://ambcrypto.com/thorchain-exploit-hits-bitcoin-ethereum-and-bsc-hackers-steal-over-10-mln/
5•wslh•6m ago•1 comments

Tell HN: Audible app used 19.8GB of data while not being used

2•jimnotgym•6m ago•0 comments

Show HN: X open sourced their algorithm

https://www.xalgorithm.xyz/en
2•hsnrique•7m ago•0 comments

Does Trump Mobile know how many stripes are on the American flag?

https://www.theverge.com/gadgets/931347/trump-mobile-t1-phone-logo-flag-stars-stripes
3•droidjj•10m ago•0 comments

Show HN: Emergence World: World building as a way to evaluate LLMs

https://world.emergence.ai/
2•deepakakkil•10m ago•0 comments

ABC News has taken all FiveThirtyEight articles offline

https://twitter.com/baseballot/status/2055309076209492208
6•cmsparks•10m ago•1 comments

Dual Intel Arc Pro B60(48G) Inference, Virtualization, and Gaming Testing

https://www.lttlabs.com/articles/2026/05/15/maxsun-intel-arc-pro-b60-dual-48g-turbo-review
3•LabsLucas•11m ago•0 comments

Ask HN: Reviewing Plan from Plan Mode

3•dennis3124•12m ago•0 comments

Cvl: A C++26 library for mutating consteval state

https://github.com/friedkeenan/cvl
2•friedkeenan•13m ago•0 comments

Don't Design Your Emails (2016)

https://www.gkogan.co/dont-design-emails/
1•downbad_•15m ago•0 comments

PSVL 1.0 – The most comprehensive source-visible license (276 clauses)

https://github.com/BMBOMICH/PSVL
1•BMBOMICH•15m ago•0 comments

Taiwan's chips power the global economy. China holds the leverage

https://restofworld.org/2026/china-taiwan-tsmc-semiconductor-economic-risk/
2•srameshc•15m ago•0 comments

SSH reverse proxy written in Rust

https://github.com/firebadnofire/CentralSSH
2•firebadnofire•18m ago•0 comments

The Fall of the Theorem Economy

https://davidbessis.substack.com/p/the-fall-of-the-theorem-economy
5•cubefox•18m ago•0 comments

AI_glue – drop-in audit and governance for OpenAI and Anthropic apps

https://github.com/simonhansedasi/ai_glue
2•vigcneiugh•21m ago•0 comments

"Should I bring an umbrella to this thread?" – beyond toxicity/content scoring

https://vibecheck.opennotes.ai
1•anateus•21m ago•0 comments

Hackers have breached tank readers at US gas stations

https://www.cnn.com/2026/05/15/politics/iran-hackers-tank-readers-gas-stations
9•berkeleyjunk•21m ago•2 comments

A live shared night sky explore constellations with strangers and make wishes

https://constellations.unlicensedstudio.com/
1•allstern•23m ago•0 comments

Node-prewarm: CLI for Node 25's NODE_COMPILE_CACHE

https://ben3d.ca/blog/introducing-node-prewarm
1•bhouston•23m ago•0 comments

Private agent-to-agent payments on Solana with ZK proofs

https://github.com/agentzeny/snap-public
2•agentzeny•24m ago•0 comments

Lookagain: Sequential code review with fresh agent contexts

https://github.com/HartBrook/lookagain
1•pike00•26m ago•0 comments

Silicon Valley Wants to Put a Chip in Your Brain

https://www.politico.com/news/magazine/2026/05/15/silicon-valley-ai-transhumanism-brain-data-0090...
2•ano-ther•26m ago•0 comments

Write HTML. Render video. Built for agents

https://github.com/heygen-com/hyperframes
1•mv•27m ago•0 comments

Near-invisible solar cells that could turn windows into power generators

https://techxplore.com/news/2026-05-scientists-invisible-solar-cells-windows.html
3•geox•29m ago•0 comments

Show HN: AI movies and dystopian/utopian futures

https://github.com/2020science/ai-in-films-corpus
1•2020science•32m ago•0 comments