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

In India, You Can Get Milk Delivered Faster Than It Takes to Make Coffee

https://www.wsj.com/business/logistics/in-india-you-can-get-milk-delivered-faster-than-it-takes-t...
1•achow•1m ago•0 comments

Show HN: A calm place to think, talk to your team, and move ideas forward

https://www.f-rello.com
1•karstenb•2m ago•0 comments

Error in digital identity verification cost university employee her job

https://www.heise.de/en/news/Fatal-click-at-BfV-Online-research-destroys-existence-11201025.html
1•moritzruth•3m ago•0 comments

Show HN: Salary benchmarks, ATS keyword trends and skills demand for data jobs

https://www.datamatastudios.com/tools
1•datamatastudios•4m ago•0 comments

Childhood Computing

https://susam.net/childhood-computing.html
2•blenderob•5m ago•0 comments

Lance – native supports image and video understanding, generation, and editing

https://huggingface.co/bytedance-research/Lance
1•modinfo•6m ago•0 comments

A CA Built for the Threat Model We Have

https://unmitigatedrisk.com/?p=1245
2•GordonS•7m ago•0 comments

KernelScript: DSL for Kernel Customization and App Optimizations

https://www.phoronix.com/news/KernelScript
1•csmantle•10m ago•0 comments

Perceptual Image Codec: What Matters in Practical Learned Image Compression

https://apple.github.io/ml-pico/
1•ksec•11m ago•0 comments

Pi-Mojo – A Mojo Port of Pi AI Agent Toolkit

https://github.com/atveit/pi-mojo/tree/main
1•amund•13m ago•0 comments

Autotrader – paper trading AI agent for Indian equities

https://github.com/analyticalmonk/autotrader
1•akashtndn•17m ago•0 comments

Show HN: Kanban CLI (A local-first, agent-first task manager for the terminal)

https://codeberg.org/hydrafog/kanban
2•hydra-f•18m ago•1 comments

Binary Lambda Calculus

https://esolangs.org/wiki/Binary_lambda_calculus
2•optimalsolver•29m ago•0 comments

Cookie banners make vision models hallucinate webpage content

https://chrmod.net/archive/cookie-banners-vision-models/
2•chrmod•29m ago•0 comments

From Ivory Tower to Iron Curtain: The Academics Who Reshaped the CIA [video]

https://www.youtube.com/watch?v=mPhbq69K3tY
1•Anon84•30m ago•0 comments

Mastering Dyalog APL

https://mastering.dyalog.com/README.html
4•tosh•31m ago•0 comments

The Meaning of Doing Mathematics

https://arxiv.org/abs/2509.15998
1•fanf2•31m ago•0 comments

A Brief History of Lab Notebooks

https://www.asimov.press/p/lab-notebooks
2•Luc•37m ago•0 comments

Expanding the human proteome with microproteins and peptideins

https://research.ucc.ie/en/publications/expanding-the-human-proteome-with-microproteins-and-pepti...
1•janandonly•37m ago•0 comments

$100 to upgrade Fresh IDE for ePub TUI reading

1•jph•39m ago•0 comments

Bitcoin Depot files for bankruptcy, takes 9000 Bitcoin ATMs offline

https://www.msn.com/en-us/money/news/bitcoin-depot-files-for-bankruptcy-takes-9000-bitcoin-atms-o...
1•janandonly•40m ago•0 comments

Productivity Paradox

https://en.wikipedia.org/wiki/Productivity_paradox
1•gyomu•46m ago•0 comments

Supercharge Claude Code, Cursor, Codex with Semantic Code Intelligence

https://github.com/colbymchenry/codegraph
1•beyti•48m ago•1 comments

To A.I. Executives, We're All Just 'Meat Computers'

https://www.nytimes.com/2026/05/24/business/meat-computer-brain-artificial-intelligence.html
1•sbulaev•49m ago•0 comments

The invisible fabric of AI: chips aren't a US-China war, but a 30-country chain

https://zoopa.es/en/innovation-technology/invisible-fabric-ai-chips-geopolitics/
2•carlosortet•49m ago•1 comments

Show HN: Fleet – Python supervisor for running coding agents in parallel

2•sermakarevich•51m ago•0 comments

Responsible Work with AI

https://www.satisfice.com/responsible
1•satisfice•52m ago•0 comments

I bypassed AWS API Gateway auth with a trailing slash. Got $12K bounty

https://theguptalog.blogspot.com/2026/04/i-bypassed-aws-api-gateway-auth-with.html
3•GeorgeWoff25•54m ago•2 comments

The AI Existential Crisis: Western AI Agents Will Win Commerce

https://medium.com/@vektormemory/the-ai-existential-crisis-western-ai-agents-will-win-finance-chi...
1•vektormemory•54m ago•0 comments

Which age-gates should be skill-gates and vice-versa?

https://shkspr.mobi/blog/2026/05/which-age-gates-should-be-skill-gates-and-vice-versa/
2•blenderob•1h ago•0 comments