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

Polymarket is dying thanks to bad engineering

https://twitter.com/llmfeeder/status/2128007892737597859
2•cft•2m ago•0 comments

Knotless: Git on ATProto

https://knotless.dev/
2•jcbhmr•2m ago•0 comments

Baidu's Unlimited SVG generates SVGs from images stroke by stroke

https://huggingface.co/baidu/Unlimited-SVG
3•slymax•4m ago•0 comments

New integrations now go to the Home Assistant Marketplace

https://contributors.home-assistant.io/blog/2026/12/01/new-integrations-go-to-the-marketplace/
1•Volundr•4m ago•0 comments

Warren Buffett, legendary investor, dies at 96

https://edition.cnn.com/2026/12/01/economy/warren-buffett-obituary§
2•stigi•8m ago•0 comments

Samsung Heavy Aims for First Large Floating Data Center

https://news.slashdot.org/story/26/12/01/169229/samsung-heavy-aims-for-worlds-first-large-floatin...
1•signa11•12m ago•0 comments

Show HN: Advent Calendar Doors – Collaborative 24-door holiday calendar

https://adventcalendardoors.com/
1•ht7850142•14m ago•0 comments

White House says Lutnick will testify before Congress on Nvidia

https://apnews.com/article/nvidia-lutnick-jensen-huang-congress-subpoena-b198d4b37821cf50c874e6e0...
1•petethomas•14m ago•0 comments

SugarBind – Support Healthy Blood Sugar and Daily Wellness

https://open.spotify.com/episode/4hwJgkewMEbaZLbOa9tbxQ
1•Suzanwhite•15m ago•1 comments

Meeks: Mr. Huang now agrees that some Nvidia chips had been diverted to China

https://democrats-foreignaffairs.house.gov/2026/12/meeks-issues-statement-on-transcribed-intervie...
1•pcvarmint•15m ago•0 comments

US curbs push Tencent, Alibaba and ByteDance from Nvidia to local chips: sources

https://www.reuters.com/business/retail-consumer/tencent-alibaba-bytedance-shift-nvidia-budgets-d...
1•snikolaev•15m ago•0 comments

Société Générale will tighten data center lending as it expects a slowdown

https://startupfortune.com/socit-gnrale-will-tighten-data-center-lending-as-it-expects-a-slowdown/
1•petethomas•15m ago•0 comments

A new AI model for plotting bio-assays graph

https://biodiorama.com/graph/
1•abhishekum•19m ago•0 comments

Show HN: Modern Stunts. Broderbund's Stunts in Godot with Plugins and Mods

https://modernstunts.com/
1•thepipetogrep•19m ago•0 comments

Stambha – Real macOS on Your PC

https://garvitsurana271.github.io/stambha/
1•geerlingguy•22m ago•0 comments

GLM 5.4 now available on OpenRouter

https://openrouter.ai/z-ai/glm-5.4
2•theanonymousone•23m ago•1 comments

Show HN: Production Grammar-Guided Decoding in vLLM with Xgrammar Benchmarks

https://github.com/grfdsasdvef/vllm-constrained-decoding-cookbook
1•snowdensay•26m ago•0 comments

Microsoft rolls out Entra ID MFA checks to block automated fraud

https://www.bleepingcomputer.com/news/microsoft/microsoft-entra-id-gets-mfa-anti-bot-checks-to-bl...
2•Smith-7831•35m ago•0 comments

DevElif

https://develif.com
1•DevElif•38m ago•1 comments

Warren Buffett, legendary investo, dies at age 96

https://www.cbsnews.com/news/warren-buffett-berkshire-hathaway-dies-age-96/
2•riffraff•38m ago•0 comments

Ask HN: Which model do you use for writing?

2•reddmachine•47m ago•3 comments

Show HN: OpenRSI Physics:AI Starting to Beat the Record on Open Physics Problems

https://openrsi.foundation/openrsi-physics/#home
1•gdoptimizer•50m ago•0 comments

Got Scammed

1•srajendiran3•53m ago•1 comments

Trading Desk – Fail-closed paper trading and risk workbench (Python, SQLite)

https://github.com/hkedia08/trading-desk
1•harshkedia600•57m ago•0 comments

Warren Buffett Has Died

https://finance.yahoo.com/markets/live/warren-buffett-dies-tributes-and-reactions-mourning-the-or...
2•FinnLobsien•58m ago•0 comments

Show HN: BenchPoll–Set weights for AI benchmarks

https://benchpoll.com/
1•twotokens•59m ago•0 comments

Software as a Medium

https://ryo.lu/journal/software-as-a-medium
1•meetpateltech•1h ago•1 comments

New AI breakthrough changes everything (Plato's Key) [video]

https://www.youtube.com/watch?v=aeN8TrR-kdw
1•peter_d_sherman•1h ago•0 comments

The cyber security risk in modern cars

https://www.bbc.com/news/articles/cm98x37pn9z2o
2•1659447091•1h ago•1 comments

The slow armoured train that took Kim Jong Un to Beijing

https://www.abc.net.au/news/2026-12-02/inside-kim-jong-un-armoured-bulletproof-green-train/107451650
2•Gaishan•1h ago•0 comments