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

Find investors for your startup – Investor Match Guarantee

https://leadagentx.ai
1•liranbr•3m ago•0 comments

An Alternative Syntax for Type Inference in Java

https://aghasemi.github.io/blog/?p=P0002
1•theanonymousone•7m ago•0 comments

Endless Execution

https://world.hey.com/dhh/endless-execution-4157e065
1•andsoitis•7m ago•0 comments

Forecasting the AI Boom till 2030

https://hunchfox.substack.com/p/the-cost-of-abundance-ai-2030
1•sahil_chaudhary•8m ago•0 comments

The Pace

https://vertigo.kuber.studio/diary/016-the-pace.html
1•vertigoruntime•10m ago•0 comments

Show HN: Everything a web page can learn about you, in plain English

https://sessioncontext.org
2•oddurs•13m ago•1 comments

Why Beyond Traditional RAG?

https://chandula7.gumroad.com/l/Advanced_RAG_LangGraph_Patterns
7•GeorgeTj•16m ago•4 comments

The Three Eras of Undergraduate Education

https://forklightning.substack.com/p/the-three-eras-of-undergraduate-education
1•herbertl•20m ago•0 comments

A full-duplex AI phone agent that listens while speaking

https://www.famulor.io
1•imankoma•21m ago•0 comments

A Skeptic's Guide to AI Regulation

https://twitter.com/cesifoti/status/2098876203822387327
1•Anon84•26m ago•0 comments

AI permissioned coworker framework and designs

https://eisenzopf.github.io/Thelve-coworkers/demo/
2•zerosegfaults•27m ago•0 comments

Endomorphisms of Affine Spaces and the Jacobian Problem [AI Statement.]

https://arxiv.org/abs/2609.05746
2•procedurecall•27m ago•1 comments

The Poisoned Chalice and the Court of the Opened Eye

https://danverbraganza.com/writings/the-poisoned-chalice-and-the-court-of-the-opened-eye?hn=1
2•nvader•28m ago•0 comments

Japan's book scene is quietly moving from bookstores to libraries

https://untranslatedjp.substack.com/p/japans-book-scene-is-quietly-moving
2•herbertl•29m ago•0 comments

Show HN: Practice English Grammar and Pronunciation (Uses Azure Speech)

https://marksdailyenglish.com/
2•MarkMc•32m ago•0 comments

Why George W Bush is Africa's favourite US president

https://www.ft.com/content/72424694-a86e-11e9-984c-fac8325aaa04
2•ViktorRay•38m ago•0 comments

RSI AI Explained: What It Is and Where It Could Lead

https://piszczek.pl/blog/rsi-ai-recursive-self-improvement
2•pich•41m ago•0 comments

Killing with a car costs $1.6M, California requires drivers to carry $30K

https://maxmautner.com/2026/09/11/liability-coverage.html
5•mslate•41m ago•1 comments

Nova Tools. Tools by AIs for AIs

https://github.com/mas-bandwidth/nova-tools
2•gafferongames•43m ago•0 comments

China on track to launch Mars sample-return mission in 2028: 'A Sputnik moment?'

https://www.space.com/astronomy/mars/china-on-track-to-launch-mars-sample-return-mission-in-2028-...
2•bookofjoe•44m ago•0 comments

Show HN: YazSes – offline hold-to-talk voice dictation for Linux, macOS, Windows

https://github.com/MSKazemi/yazses
3•mskazemi•46m ago•0 comments

Conformal correlation: substituting the correlation we all know?

https://www.sciencedirect.com/science/article/pii/S014036642500355X
2•gigatexal•48m ago•0 comments

Michael Levin:Consciousness, Biology, Universal Mind, Emergence, Cancer Research [video]

https://www.youtube.com/watch?v=c8iFtaltX-s
2•binyu•48m ago•0 comments

Show HN: PDFidelity – Translate PDFs while preserving the original layout

https://www.pdfidelity.com/
2•andygeek•56m ago•1 comments

StarCraft returns in 2030 as an open-world shooter

https://www.theverge.com/games/994371/starcraft-returns-in-2030-as-an-open-world-shooter
11•sbulaev•57m ago•3 comments

Rivals Altman and Musk rally behind Dario Amodei's call for an AI slowdown

https://www.ft.com/content/31220b59-b0c6-401c-a146-2b7b5d138837
2•sbulaev•57m ago•1 comments

OpenAI's rogue AI tried to hack another company in May

https://www.theverge.com/ai-artificial-intelligence/994383/openais-rogue-ai-rubygems-hack
3•aaronbrethorst•57m ago•0 comments

The US is replacing every official latitude, longitude and height it publishes

https://spacedaily.com/s-the-united-states-is-replacing-every-official-latitude-longitude-and-hei...
7•rurp•58m ago•0 comments

"All my fundees have blue eyes." Epstein and the tech dark ideology

https://www.codastory.com/authoritarian-tech/blue-eyes-epstein-artificial-intelligence-eugenics-s...
4•Anon84•58m ago•0 comments

Unread 5.0

https://www.goldenhillsoftware.com/2026/09/unread-50/
3•johnsbrayton•1h ago•1 comments