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

The Watchmaker: Building a Mechanical Watch in a Database

https://sqlartist.github.io/posts/the-watchmaker-building-a-mechanical-watch-in-a-database/
1•speckx•57s ago•0 comments

Alexander Grothendieck: A Life in Three Universes

https://grothendieckmath.com/
1•AlienMuse•59s ago•0 comments

Why papers get desk-rejected before peer review even starts

https://presub.app/guides/why-papers-get-desk-rejected/
1•Gigacore•1m ago•0 comments

Show HN: Reverie – local memory for coding agents that learns your corrections

https://github.com/muditsarda1122/Reverie
1•msarda_23•1m ago•0 comments

Scaling "E-Waste": Benchmarking LLMs on Multiple Cheap GPUs

https://esologic.com/multi-gpu-scaling/
1•eso_logic•1m ago•0 comments

Will foldable phones become mainstream?

1•NarcisMirandes•2m ago•1 comments

AMD YOLO (2025)

https://geohot.github.io//blog/jekyll/update/2025/03/08/AMD-YOLO.html
1•oldsj•2m ago•0 comments

What I found in 39,535 Claude.md and AGENTS.md files

https://internals.laxmena.com/p/what-i-found-in-39535-claudemd-and
1•laxmena•2m ago•0 comments

Show HN: Atli – MCP server that lets AI agents buy and install travel eSIMs

https://heyatli.com/mcp
1•peterhoang•3m ago•0 comments

Show HN: An API for word timestamps from speech, 75% within 20ms

https://quebec.yarn.so
1•jasperstory•3m ago•0 comments

TE Connectivity at OCP Summit 2026 the Interview

https://www.servethehome.com/te-connectivity-at-ocp-summit-2026-the-interview/
1•ksec•4m ago•0 comments

What would you ask a Head of Data Science Team at J&J EMEA?

https://deepsense.ai/resource/ai-for-evidence-launch-readiness-and-clinical-planning/
3•nvmdbljstm•4m ago•0 comments

Why shared ChatGPT-Codex limits could erode ChatGPT's edge

https://community.openai.com/t/please-keep-chatgpt-and-codex-usage-limits-separate-in-december-20...
1•LxStardust•5m ago•0 comments

How to Get Domain Admin with a C2 (Fast and Easy)

https://medium.com/@nukeratframework/8-ways-to-get-domain-admin-with-a-c2-fast-and-easy-df0910eb4699
1•JohnTheTitor•5m ago•0 comments

My Agentic Setup [video]

https://www.youtube.com/watch?v=-Oge2vboGiw
1•franze•5m ago•0 comments

Bangladesh's Rooppur 1 supplies country's first nuclear energy

https://www.world-nuclear-news.org/articles/bangladeshs-rooppur-1-nuclear-supplies-countrys-first...
1•mpweiher•5m ago•0 comments

Why No AI

https://whynoai.info/
1•HotGarbage•5m ago•0 comments

How we made Trust Infrastructure for Digital Credentials

https://credoseal.com/
1•dclavijo•6m ago•0 comments

An AI toy for 3-year-olds described gang rape. Major retailers are pulling it

https://www.nbcnews.com/tech/tech-news/ai-toys-kids-walmart-target-pull-plush-cat-described-sexua...
2•ceejayoz•6m ago•0 comments

Show HN: SigMap, an AR Wi-Fi Heatmap for iPhone

https://apps.apple.com/us/app/sigmap-wifi-heatmap/id6819154750
1•kianfong•10m ago•0 comments

Nvidia Recommits to FP64 with a New GPU, the Rubin HPC

https://www.hpcwire.com/2026/11/16/nvidia-recommits-to-fp64-with-a-new-gpu-the-rubin-hpc/
1•rbanffy•10m ago•0 comments

Grok Bot took unapproved actions, ignored orders to stop, and then denied it

https://arstechnica.com/security/2026/11/grok-bot-took-unapproved-actions-ignored-orders-to-stop-...
2•tabith•11m ago•0 comments

Tropical Rainforests Species may be surprisingly young

https://phys.org/news/2026-11-species-tropical-rainforests-young-emergence.html
1•PaulHoule•11m ago•0 comments

Nvidia and Lambda disclose first production co-packaged optics cluster

https://www.servethehome.com/nvidia-and-lambda-disclose-first-production-co-packaged-optics-clust...
2•wondersky•11m ago•0 comments

In Praise of Bureaucracy

https://yusufaytas.com/in-praise-of-bureaucracy
7•inprba•11m ago•0 comments

What happens if we build it and nobody dies?

https://www.theargumentmag.com/p/what-happens-if-we-build-it-and-nobody
1•ForHackernews•12m ago•0 comments

Where to spend search compute: depth, stages, or width in reranked retrieval [pdf]

https://cshorten.github.io/preprints/scaling-reranked-retrieval.pdf
1•bobvanluijt•12m ago•1 comments

Distributed Algorithms of Ancient Greece

https://kikkupico.github.io/DAAG2/
1•kikkupico•13m ago•0 comments

Show HN: Alloy CSS, dialogs, menus and tabs that work with JavaScript off

https://alloyhtml.com/example.html
3•prafandy•13m ago•1 comments

Emet: Code checking AI. Not another model grading the answer

https://emet.so/platform
2•fuse_raf•14m ago•0 comments