frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Meta releases open data to train General AI Co-Scientists

https://huggingface.co/datasets/facebook/research-plan-gen
1•shash42•6m ago•0 comments

Show HN: PokéPath TD – Free Pokémon tower defense game

https://pokepathgame.com
1•airobus•16m ago•0 comments

Building Privacy Preserving RAG with Homomorphic Encryption

https://www.subhashdasyam.com/2025/11/building-privacy-preserving-rag-with.html
1•dxsecarch•17m ago•0 comments

Question for Engineering Leaders

https://shadowscoping.com/
1•rezat•18m ago•1 comments

Rapid Validation of Product Concepts with AI

https://luvsheth.com/p/rapid-validation-of-product-concepts
1•Reviving1514•18m ago•1 comments

Somebody Build This

1•Caritaspax•21m ago•2 comments

Who's in charge of Venezuela and what happens next?

https://www.bbc.com/news/articles/crmlz7r0zrxo
4•SilverElfin•24m ago•3 comments

Show HN: CloudSlash – Find AWS waste and generate Terraform state rm commands

1•drskyle•24m ago•0 comments

AGI Is Here

https://www.robinsloan.com/winter-garden/agi-is-here/
2•cmod•27m ago•1 comments

'Chinese Peptides' Are the Latest Biohacking Trend in the Tech World

https://www.nytimes.com/2026/01/03/business/chinese-peptides-silicon-valley.html
1•bookofjoe•28m ago•1 comments

They Said AI Would Replace You by Now

https://www.youtube.com/watch?v=dH_UvWmvny0
1•cable2600•28m ago•0 comments

Americans Choosing Cremation at Historic Rates, NFDA Report Finds

https://nfda.org/news/media-center/nfda-news-releases/id/9772/americans-choosing-cremation-at-his...
3•toomuchtodo•29m ago•0 comments

Damn Vulnerable AI Bank – Practice AI Security

https://dvaib.com
1•dxsecarch•29m ago•0 comments

Show HN: A Android Color Detection Auto Clicker with no full-screen ads

1•dopifier•30m ago•0 comments

Berlin power outages after left-wing anarchist attack on power cables

https://www.irishtimes.com/world/europe/2026/01/04/berlin-power-outages-after-left-wing-anarchist...
3•wslh•35m ago•1 comments

Don't Forget the WAL: How I Lost SQLite Data in Podman Containers

https://bkiran.com/blog/sqlite-containers-data-loss
3•thunderbong•36m ago•1 comments

Wanderly AI Travel App Waitlist

https://waitlister.me/p/wanderly
1•CuylerM•37m ago•1 comments

During Helene, I just wanted a plain text website

https://sparkbox.com/foundry/helene_and_mobile_web_performance
22•CqtGLRGcukpy•46m ago•11 comments

Agent Orchestration Is Not the Future

https://moridinamael.github.io/agent-orchestration/
1•mordymoop•49m ago•1 comments

What is Agent context engine

https://ragflow.io/basics/what-is-agent-context-engine
1•yingfeng•51m ago•0 comments

Tempest Future Fighter Aims for "Extreme Range," Twice F-35 Payload

https://www.twz.com/air/tempest-future-fighter-aims-for-really-extreme-range-twice-f-35-payload
1•throwoutway•54m ago•0 comments

Politics and the English Language – George Orwell [Essay]

https://www.orwellfoundation.com/the-orwell-foundation/orwell/essays-and-other-works/politics-and...
3•nomilk•58m ago•1 comments

Show HN: Vho – AST-based analysis for better AI refactoring of large codebases

https://vue-hook-optimizer.vercel.app/
2•huali•58m ago•1 comments

vLLM: An Efficient Inference Engine for Large Language Models

https://www2.eecs.berkeley.edu/Pubs/TechRpts/2025/EECS-2025-192.html
2•matt_d•1h ago•0 comments

Linuxulator on FreeBSD Feels Like Magic

https://hayzam.com/blog/02-linuxulator-is-awesome/
6•arch1e•1h ago•0 comments

Ask HN: What app features actually help vocabulary stick long-term?

1•hussein-khalil•1h ago•2 comments

Ask HN: Is there a better alternative to email?

1•DinakarS•1h ago•1 comments

AI Safety ArXiv Scraper

https://theguardrail.net/
2•chiwilliams•1h ago•0 comments

Translating Cave Story into Classical Latin with Gemini

https://www.semilin.dev/blog/doukutsu-translator
2•semilin•1h ago•0 comments

Show HN: I Made a Gamma Clone with 1 Prompt

https://prompt-to-ppt.lovable.app/
1•nsemikey•1h ago•1 comments