frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Lace Lithography raises $40M to replace chip-making light with helium atoms

https://thenextweb.com/news/lace-lithography-40m-series
2•shaicoleman•4m ago•0 comments

Designing a single-file MMAP-backed read-only hashed multi-table database

https://notes.volution.ro/v1/2026/03/notes/53ac09b0/
2•ciprian_craciun•5m ago•0 comments

Militarized snowflakes: The accidental beauty of Renaissance star forts

https://bigthink.com/strange-maps/star-forts/
4•Brajeshwar•8m ago•0 comments

PromptPaste – Voice Input for Claude Code and Codex CLI

https://www.promptpasteapp.com/
1•yanivnoema•8m ago•0 comments

How a Bill Gates-Backed Company Landed in a Fight Between Congo and Belgium

https://www.wsj.com/world/africa/congo-belgium-bill-gates-company-6d0e4be0
2•ViktorRay•9m ago•0 comments

Software Is Becoming Something You Invoke, Not Navigate

https://opuslabs.substack.com/p/the-agent-layer-is-rewriting-software
3•opuslabs•10m ago•0 comments

Phos-Chek Fire Retardant

https://en.wikipedia.org/wiki/Phos-Chek
2•laurensr•16m ago•0 comments

Explanation for why we don't see two-foot-long dragonflies anymore fails

https://arstechnica.com/science/2026/03/leading-explanation-for-ancient-giant-flying-insects-gets...
3•amichail•17m ago•0 comments

When Coupled Volcanoes Talk, These Researchers Listen

https://www.quantamagazine.org/when-coupled-volcanoes-talk-these-researchers-listen-20260327/
4•Brajeshwar•18m ago•0 comments

I Beat the Benchmark and Still Failed

https://www.tarc.blog/essays/beating_the_benchmark.html
2•_Tarik•20m ago•0 comments

Does Your Skill Earn Its Keep?

https://efexen.substack.com/p/does-your-skill-earn-its-keep
3•efexen•21m ago•0 comments

Leaked Anthropic Model Presents 'Unprecedented Cybersecurity Risks'

https://gizmodo.com/leaked-anthropic-model-presents-unprecedented-cybersecurity-risks-much-to-pen...
4•HiroProtagonist•22m ago•3 comments

I accidentally spammed a year of calendar invites

https://mattfarrugia.com/posts/i-accidentally-spammed-a-year-of-calendar-invites
3•mfarrugia•22m ago•1 comments

I Can't See Apple's Vision

https://matduggan.com/i-cant-see-apples-vision/
3•birdculture•23m ago•0 comments

Be careful: chatting with AI about your case is discoverable

https://harvardlawreview.org/blog/2026/03/united-states-v-heppner/
4•rogerallen•25m ago•2 comments

Show HN: Free, in-browser PDF editor

https://breezepdf.com/?v=2
7•philjohnson•26m ago•0 comments

The AI-assisted solo technical writer

https://buildwithfern.com/post/ai-assisted-technical-writer
2•ivanech•26m ago•0 comments

India's maternal mortality drops nearly 80% since 1990: Global study

https://economictimes.indiatimes.com/news/india/indias-maternal-mortality-drops-nearly-80-since-1...
4•pvsukale3•26m ago•1 comments

Show HN: StarFlicks – A free movie tracker built with Django, Next.js and Expo

https://starflicks.it
2•MikeDevLab•27m ago•1 comments

Apple's last tower topples and the others will follow

https://www.theregister.com/2026/03/27/apples_last_tower_topples/
3•gostsamo•29m ago•0 comments

AI data centres can warm surrounding areas by up to 9.1°C

https://www.newscientist.com/article/2521256-ai-data-centres-can-warm-surrounding-areas-by-up-to-...
3•Brajeshwar•29m ago•2 comments

Show HN: VellaVeto — blocks unsafe MCP tool calls by default

https://github.com/paolovella/vellaveto
2•paolovella•29m ago•0 comments

Show HN: Web-based setup tool for Django Cookiecutter

https://aisaastemplate.com/tools/cookiecutter/
2•data-leon•30m ago•0 comments

Sony temporarily suspends memory card sales due to shortages

https://www.theverge.com/tech/902828/sony-sd-cfexpress-memory-card-shortage
4•tbakker•33m ago•0 comments

I decompiled the White House's new app

https://thereallo.dev/blog/decompiling-the-white-house-app
16•amarcheschi•33m ago•3 comments

Antimatter took to the road for the first time

https://www.cnn.com/2026/03/27/science/antimatter-transported-first-time-cern
3•stevenjgarner•36m ago•0 comments

Coldkey – Post-quantum age key generation and paper backup tool

https://github.com/pike00/coldkey
2•pike00•38m ago•1 comments

Show HN: A neuromorphic engine as a stock trader

https://github.com/MasterAlgo/stocks/blob/main/README.md
2•bullbash•39m ago•0 comments

Brewers are turning Coca-Cola into a boozy wine

https://www.popsci.com/science/coca-cola-wine/
2•Brajeshwar•39m ago•2 comments

Rock Star: Reading the Rosetta Stone

https://www.historytoday.com/archive/feature/original-rock-star
2•samizdis•40m ago•0 comments