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

Show HN: Paige – A spoiler-free AI book chat

https://github.com/derekmpeterson/paige
1•dualarte•21s ago•0 comments

China's Loongson launches 16-core server CPU built on LoongArch architecture

https://www.tomshardware.com/pc-components/cpus/chinas-loongson-launches-homegrown-16-core-server...
1•unleaded•2m ago•0 comments

Towards a history of the hammock: An Indigenous technology in the Atlantic world

https://link.springer.com/article/10.1057/s41280-025-00379-w
1•bookofjoe•2m ago•0 comments

Agent Identity: Why Every Agent Vulnerability Is a Trust Boundary Failure

https://portkey.ai/blog/why-every-agent-vulnerability-is-a-trust-boundary-failure/
1•segalord•3m ago•0 comments

Costs of Running a 15k/mo AI SaaS [video]

https://www.youtube.com/watch?v=tK2K26CeThY
1•mesmertech•5m ago•1 comments

Nvidia Partner Wants to Put a $150k AI Data Center in Your Yard

https://www.bgr.com/2186797/nvidia-home-mini-ai-data-center-span/
1•Adam-Hincu•5m ago•1 comments

Magit - a complete text-based user interface to Git

https://github.com/magit/magit
1•modinfo•6m ago•0 comments

Show HN: Shikhu – Understand the code your agents write

https://github.com/arjunpatel7/shikhu
1•arjunkpatel•6m ago•0 comments

Evaluating Offline Monitoring of Internal AI Agents

https://www.lesswrong.com/posts/yrbyyvFvuaGfRAtB7/evaluating-offline-monitoring-of-internal-ai-ag...
1•joozio•7m ago•0 comments

How to Connect Hermes Agent to MCP

https://www.arcade.dev/blog/connect-hermes-agent-mcp-arcade/
1•manveerc•8m ago•0 comments

Cramming 1M (Scaled to Zero) Virtual Machines in a Single Box

https://unikraft.com/blog/1m-vms-single-box/
1•tanelpoder•10m ago•0 comments

The Most Detailed Image yet of the Milky Way's Center

https://www.wired.com/story/this-is-the-most-detailed-image-yet-of-the-milky-ways-center/
1•joozio•11m ago•0 comments

The Ethical People-Smuggler

https://www.economist.com/interactive/1843/2026/06/26/the-good-people-smuggler
1•Geekette•15m ago•1 comments

Working around dragons with the Lemote Yeeloong laptop and OpenBSD

http://oldvcr.blogspot.com/2026/06/working-around-dragons-with-lemote.html
6•zdw•15m ago•0 comments

Show HN: DRM-Free Books

https://frequal.com/Perspectives/DrmFreeAuthors.html
2•TeaVMFan•15m ago•0 comments

Tech firms blame AI for rising PC and console prices

https://www.bbc.co.uk/news/articles/cd95k584pzqo
1•logickkk1•18m ago•0 comments

Show HN: A directory of open source alternatives to proprietary software

https://houseofopen.com/
1•TheOmkarBirje•19m ago•0 comments

More than 3M college students are raising kids. Most won't graduate

https://fortune.com/2026/06/28/student-parents-workforce-talent-shortage-child-care-okebugwu/
1•Brajeshwar•21m ago•0 comments

Your Shit Is Unreadable

https://unstory.eu/lcn/
4•jonifico•21m ago•0 comments

AI Economy from the Bottom Up

https://www.exponentialview.co/p/the-state-of-the-ai-economy
1•joddystreet•25m ago•0 comments

Customer service as a mirror of modern life

https://connorgurney.me.uk/2026/06/customer-service-mirror-of-modern-life/
1•connorgurney•25m ago•0 comments

The Dawn of the Software-Defined Company

https://www.impala.systems/blog/the-dawn-of-the-software-defined-company/
1•shukantpal•25m ago•0 comments

'Humans behave better when they're being watched'

https://techcrunch.com/2026/06/26/xprize-founder-says-humans-behave-better-when-theyre-being-watc...
2•skadamat•26m ago•0 comments

What do we know about Nvidia Feynman Architecture in 2026

https://old.reddit.com/r/AIProgrammingHardware/comments/1uhyhw3/what_do_we_know_about_nvidia_feyn...
1•javaeeeee•30m ago•1 comments

Redesign of US Government websites stokes surveillance fears

https://www.theguardian.com/us-news/2026/jun/28/government-website-visitor-tracking-surveillance-...
2•howard941•33m ago•0 comments

Professor denounces mass AI fraud on an exam at Brown University

https://english.elpais.com/education/2026-06-28/ai-fraud-at-brown-university-academic-integrity-i...
6•geox•33m ago•0 comments

I used Claude Code to get a second opinion on my MRI

https://antoine.fi/mri-analysis-using-claude-code-opus
37•engmarketer•39m ago•44 comments

The Stonehenge Experiment: 60 people move a 3.5-Tonne standing stone [video]

https://www.youtube.com/watch?v=4xd42UiPRjU
2•skibz•40m ago•1 comments

Ask HN: Examples of AI taste?

1•SuboptimalEng•42m ago•1 comments

Lessons from building SQLite with LLMs

https://medium.com/@sharvanath/effective-software-engineering-with-claude-codex-bf39f296b233
2•sharva•43m ago•0 comments