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

Microsoft WorkIQ

https://github.com/microsoft/work-iq/
1•vismit2000•23s ago•0 comments

1Password Supports the Ethnic Cleansing of Europe

https://www.alilleybrinker.com/blog/1password-funds-ethnic-cleansing/
1•ricobecks•2m ago•0 comments

Some of the greatest artists are in fact extreme bureaucratic talents

https://twitter.com/i/status/2094462115192951011
1•Michelangelo11•6m ago•0 comments

The Hugging Face hack could indicate cultural issues at OpenAI

https://www.technologyreview.com/2026/08/31/1143180/hugging-face-hack-could-indicate-cultural-iss...
1•joozio•6m ago•0 comments

Reverse engineering an Wii game for the first time

https://en.blog.bobh0724.net/2025/08/25/reverse-engineer-puyo20-wii/
1•uneven9434•8m ago•0 comments

12V Deep Cycle Battery

https://www.jrepower.com/products/12v-deep-cycle-battery/
1•Jreecoasis•10m ago•0 comments

Hertzfeld, Andy oral history, part 1 of 2 (2025)

https://www.computerhistory.org/collections/catalog/300000188/
1•mpweiher•10m ago•0 comments

Countries gear up to create lunar standard time

https://mainichi.jp/english/articles/20260830/p2g/00m/0sc/043000c
2•BaudouinVH•10m ago•0 comments

Can your GrokBot conquer the world?

https://agentofempires.com/
1•midwitMBA•11m ago•0 comments

Drone simulator in Arduino serial monitor

https://kimsalmi.com/posts/2016/quadcopter/
1•infr88•12m ago•0 comments

Smuggled Infinities (2023)

https://adventurecapital.substack.com/p/smuggled-infinity
1•thoughtpeddler•13m ago•0 comments

How our agents build on-brand pages with design.md

https://vercel.com/blog/how-our-agents-build-on-brand-pages-with-design-md
1•vcfgdev•13m ago•0 comments

AI Agents Are Fundamentally Restructuring the Software Paradigm

https://arxiv.org/abs/2606.05608
2•zdkaster•15m ago•0 comments

Kodai – Secure your local workspace and manage secrets away from AI

https://github.com/kodai-tech-official/kodai-tech
2•kodai_tech•17m ago•0 comments

One Black Wind Turbine Blade Cut Bird Deaths 72%,the Dutch Tried It and Failed

https://www.gadgetreview.com/one-black-wind-turbine-blade-cut-bird-deaths-72-then-the-dutch-tried...
1•Markoff•19m ago•1 comments

Show HN: Watn – type a question in your shell, get a command back

https://github.com/buster/watn
1•buster•20m ago•0 comments

Show HN: I kept finding robot datasets with skewed clocks, so I built a checker

https://github.com/anicut-ai/embodied-sync
1•anicut-ai•22m ago•0 comments

Show HN: European weather outlook, 28 August – 11 September

https://www.wfy24.com/en/article/european-weather-outlook-2026-08-27
1•weatherfun•22m ago•0 comments

Unraid 8 Announced

https://unraid.net/blog/unraid-8-announced
1•crbelaus•23m ago•0 comments

Sony Argues No One's Dumb Enough to Think They Own a Digital Game

https://kotaku.com/sony-argues-no-ones-dumb-enough-to-think-they-actually-own-a-digital-game-2000...
2•razorbeamz•25m ago•1 comments

DeepSeek-V4-Flash-Vision-Exp

https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash-Vision-Exp
2•pros•29m ago•0 comments

QEMU-3dfx developer has crashout after being reported for harassment on GitHub

https://github.com/kjliew/qemu-3dfx/issues/196
1•indrora•29m ago•0 comments

Malleus Maleficarum

https://standardebooks.org/ebooks/heinrich-kramer/malleus-maleficarum/montague-summers
2•WithinReason•32m ago•0 comments

Kentucky writer, farmer and advocate Wendell Berry dies at 92

https://kentuckylantern.com/2026/08/31/kentucky-writer-farmer-and-advocate-wendell-berry-dies-at-92/
1•Kaibeezy•32m ago•0 comments

No GrapheneOS for Pixel 11 phones because Google cut a key security feature

https://www.androidauthority.com/no-grapheneos-google-pixel-11-3704622/
2•rfarley04•32m ago•0 comments

VibeCoded AI-Slop License v1.0

https://gist.github.com/NicolasCARPi/3fd349ed1ed52ae6b835d5364cda4cd6
1•doctorwhat•33m ago•0 comments

What AI code review misses: SSRF and more

https://zeroquarry.com/research/security-vulnerabilities-in-ai-reviewed-code/
1•eskibars•34m ago•1 comments

Toyohiro Akiyama

https://en.wikipedia.org/wiki/Toyohiro_Akiyama
1•tosh•35m ago•0 comments

How to Design an Agent Evaluation That Doesn't Lie to You

https://github.com/cedRiC874/researchops-agent/blob/6457358d74cc07106dfb7a348ac143cdaa87e459/docs...
1•Cedric010420•36m ago•0 comments

Firefox 156.0beta

https://www.firefox.com/en-US/firefox/156.0beta/releasenotes/
1•ErenayDev•38m ago•0 comments