frontpage.
newsnewestaskshowjobs

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

Servitor (Simple way to run local dev containers)

https://github.com/sndsabin/servitor
2•havu12•2m ago•0 comments

Show HN: New Parts for Old Computers

https://newold.computer/
1•joshu•3m ago•0 comments

AI Mentions in Job Descriptions – August 2026

https://corvi.careers/blog/ai_jobs_aug_2026/
2•sp1982•7m ago•0 comments

Pulverised recycled glass helps boost farm productivity with benefits to soil

https://www.abc.net.au/news/2026-07-31/ground-glass-silicon-fertiliser-farm-productivity/106963488
1•Tomte•11m ago•0 comments

An AI meeting recorder that sees and hears everything

https://github.com/puremetricsai/lumi
2•puremetrics•12m ago•2 comments

Show HN: Drop your site, get design feedback based on similar sites

https://design.withfudge.com/website-feedback
1•sim04ful•15m ago•0 comments

DDisasm: Reversible (bi-directional) Disassembler

https://github.com/GrammaTech/ddisasm
1•aboardRat4•18m ago•1 comments

Show HN: An AI-Powered Widget for Collecting User Feedback

https://makethisbetter.dev/
1•paicha•23m ago•0 comments

Show HN: An AI wrote and illustrated a book of fables about threads and packets

https://booyaka101.github.io/thedailyfable/day07/
3•Booyaka101•29m ago•0 comments

Lerobit MMP V1: Transforming AI Marketing-Coming Soon

https://www.lerobit.com/coming-soon
1•akliluart•35m ago•0 comments

Mob – A personal CRM as an MCP server

https://mobcrm.au/
1•benkaiser•40m ago•1 comments

I Built Peko to Fix Native App Deployment

https://app.pekoui.com/blog/why-i-built-peko
1•IAmPrestonBrown•43m ago•0 comments

Show HN: An update to the random OS (windogeOS)

https://github.com/NoTheIdiot/WindogeOS
1•notheidiot•45m ago•0 comments

Show HN: Do Codex skills save tokens? A six-run task-size benchmark

https://codex-howto-benchmark.nguyenvantamdk2.chatgpt.site
2•phelannguyen164•45m ago•0 comments

China, Open Source and AI Competitiveness with Andrew Ng

https://www.youtube.com/watch?v=2OUGXI9Y1sk
1•rasengan0•46m ago•0 comments

Show HN: swsql – A PostgreSQL client for the terminal, written in Swift

https://github.com/vdsingh/swsql
1•vikdevmail•47m ago•0 comments

Show HN: Browse all 147k Emoji Kitchen combos in the browser

https://emojimaker.cc/emoji-kitchen/
1•zz5759•49m ago•0 comments

Show HN: MovePlaybook – A local-first moving checklist with printable plans

https://moveplaybook.app/
1•lionchain•50m ago•0 comments

The Case for Colonising Titan

https://spacedaily.com/t-saturns-moon-titan-has-an-atmosphere-thicker-than-earths-and-seas-you-co...
2•Gaishan•52m ago•1 comments

Show HN: Hype League, Fantasy Football for pre-season player news

https://www.hypeleaguefootball.com/
1•AlatAnmoku•54m ago•0 comments

Psychiatric adverse events following Covid-19 vaccination

https://www.nature.com/articles/s41380-024-02627-0
4•typeofhuman•56m ago•1 comments

Forerunners to the Automobile

https://group.mercedes-benz.com/company/tradition/company-history/forerunners-to-the-automobile.html
1•num42•59m ago•0 comments

Non-human cyber warfare is here

https://evanverma.com/non-human-cyber-warfare-is-here
1•edverma2•1h ago•0 comments

Timeline of Historic Inventions

https://en.wikipedia.org/wiki/Timeline_of_historic_inventions
1•num42•1h ago•1 comments

Local, Open source AI meeting recorder that sees and hears everything

1•puremetrics•1h ago•0 comments

Spokane wildfires force thousands to evacuate, blazes 0% contained [video]

https://www.youtube.com/watch?v=EYhNWOWWM9c
2•Bender•1h ago•0 comments

Show HN: Zizq is a fast, single-binary job queue that fits into any stack

https://zizq.io
1•d11wtq•1h ago•2 comments

Need feedback: My first SaaS as a solo-founder to help brands boost visibility

https://prominara.com
1•nseara•1h ago•1 comments

Run MiniMax-H3 Locally with SGLang Diffusion on 2× RTX 5090s or 1× RTX Pro 6000

https://twitter.com/lmsysorg/status/2084110114022396018
1•yvbbrjdr•1h ago•0 comments

Ranking weird pizza cutters [video]

https://www.youtube.com/watch?v=UN-RWs3QQTY
1•ninju•1h ago•1 comments