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

AI boom poses new financial stability risks, BIS head says

https://www.reuters.com/business/finance/ai-boom-poses-new-financial-stability-risks-bis-head-say...
1•1vuio0pswjnm7•22s ago•0 comments

Europe's LLM Router

https://cortecs.ai
1•nperson•3m ago•0 comments

Anthropic Says It Blocked Possible Efforts to Build Biological Weapons

https://www.nytimes.com/2026/09/10/us/politics/anthropic-ai-biological-weapons.html
3•jbegley•5m ago•0 comments

How Did AI Get So Biased in Favor of the Left?

https://www.cato.org/commentary/how-did-ai-get-so-biased-favor-left#
2•giardini•6m ago•0 comments

GPT-Live-1 in the API

https://openai.com/index/introducing-gpt-live-1-in-the-api/
3•charlierguo•6m ago•0 comments

Show HN: AppLocker – Open-source macOS app blocker using Apple Endpoint Security

https://github.com/TranPhuong319/AppLocker
2•tranphuong319•8m ago•0 comments

Nudge or tax? At last, some data

https://timharford.com/2026/09/nudge-or-tax-at-last-some-data/
1•AndrewDucker•8m ago•0 comments

The Download: a "God-driven" cryptocurrency and a solar engineering roadmap

https://www.technologyreview.com/2026/09/10/1143828/the-download-christian-cryptocurrency-scandal...
1•joozio•8m ago•0 comments

Show HN: Open-source simulation testing infra for voice agents

https://github.com/egma-ai/egma
2•Nischalj10•8m ago•0 comments

A functional taxonomy for LLM inference in agentic tasks

https://jeffauriemma.leaflet.pub/3mv6jnffo6k24
1•jdauriemma•9m ago•0 comments

An Unauthorized History of the NFL (PBS 1983)[video]

https://archive.org/details/an-unauthorized-history-of-the-nfl-1983
1•extralongdivisi•11m ago•1 comments

Spotify browser API – A local, single-account API server in TypeScript

https://github.com/skorotkiewicz/spoti-api-server
1•modinfo•12m ago•0 comments

PlantUML Viewer (VS Code Extension – local – no server)

https://marketplace.visualstudio.com/items?itemName=chirilach.reviewer-plantuml-viewer
1•info-chirila•12m ago•0 comments

The Age-Gating of History

https://heatherburns.tech/2026/09/05/the-age-gating-of-history/
1•speckx•14m ago•0 comments

Elephants Think Before They Act

https://nautil.us/elephants-think-before-they-act-1284893
1•Brajeshwar•15m ago•0 comments

Cognition's SWE-2 achieves 92.8 on Terminal-Bench 2.1

https://tokenstead.ai/models/swe-2
2•cdnsteve•17m ago•0 comments

If approved, Project Taurus will use more electricity than Colorado Springs

https://www.cpr.org/2026/09/10/project-taurus-big-electricity-use/
3•01-_-•17m ago•1 comments

Show HN: Faint Light, 10-100x faster plate-solving/astrometry in Rust

https://github.com/fschuindt/faint_light
1•fschuindt•17m ago•0 comments

How CHERIoT Provides Strong and Usable Isolation Without an MMU

https://queue.acm.org/doi/10.1145/3831361
1•signa11•17m ago•0 comments

Gitwal – GitHub Event Archive

https://gitwal.com
1•gajus•18m ago•1 comments

We wanted to use Baseten for inference, we got admin access to their GitHub

https://www.strix.ai/blog/baseten-harbor-github-pat-takeover
7•bearsyankees•19m ago•0 comments

The Floppy Disk Nightmare: Why Installing Windows 95 Was Pure Survival

https://comuniq.xyz/Technology/post?t=1657
3•01-_-•20m ago•0 comments

1984: The Mac, Tetris, and the Toad

https://patternproject.substack.com/p/1984-introducing-the-mac-tetris-and
1•tasshin•20m ago•0 comments

Show HN: I built an AI Agent that sell itself

https://www.sendroq.com/
1•akhtaaar•22m ago•1 comments

How to Handle a Difficult Colleague

https://www.thetrueengineer.com/p/surviving-the-workplace-how-to-handle
2•adletbalzhanov•22m ago•0 comments

Coletivo – A place for AI agents to collaborate via MCP

https://coletivo.alganet.dev/
1•gaigalas•23m ago•0 comments

40 Hours, $2M+ AI credits, solve an open problem

https://mathathonchallenge.com/
1•Bluestein•24m ago•0 comments

Average daily long-haul truck traffic across US highways

https://www.reddit.com/r/MapPorn/comments/1vofgij/average_daily_longhaul_truck_traffic_across_us/
1•mooreds•25m ago•0 comments

Gemini Desktop

https://gemini.google/desktop/
3•ZacnyLos•26m ago•3 comments

Show HN: Rapto – An in-memory NoSQL database written in Zig

https://github.com/raptodb/rapto
1•andrvv•27m ago•0 comments