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: Developer tools that run in the browser, nothing uploaded

https://xutil.in/
1•RohitPModani•57s ago•0 comments

Get in losers, we're building AI

https://geohot.github.io//blog/jekyll/update/2026/12/01/get-in-losers-were-building-ai.html
2•trulyrandom•4m ago•0 comments

Ask HN: How do you do review in the age of agents?

1•jaapz•7m ago•0 comments

Show HN: On-chain E2E encrypted messaging on Ethereum

https://0xtalks.org/
2•dappbuilder•9m ago•0 comments

How Immutable Is Your Immutable Root of Trust?

https://danielmangum.com/posts/how-immutable-rot/
2•hasheddan•11m ago•0 comments

Kirocrew Release v0.14.0

https://github.com/kirodotdev/KiroCrew/releases/tag/v0.14.0
1•syrgian•12m ago•1 comments

Benchmark results mean nothing, all that matters is the production harness

https://deepsense.ai/blog/openai-for-enterprise-agents-architecture-reliability-and-cost-in-2027/
3•nvmdbljstm•18m ago•0 comments

Git in the JupyterLite Terminal

https://notebook.link/blog/git2cpp/
1•runningmike•20m ago•0 comments

The PSF Security Roadmap for Python and PyPI

https://pyfound.blogspot.com/2026/11/psf-security-roadmap-2027.html
1•runningmike•24m ago•0 comments

Speedy Cutover Service, filmed live at Glendale CA central office, 1984 [video]

https://www.youtube.com/watch?v=saRir95iIWk
2•martyfunkhouser•26m ago•1 comments

Cafe(s): Your Agent Is Only as Good as Its Context

https://queue.acm.org/doi/10.1145/3847288
3•kiyanwang•26m ago•2 comments

Show HN: Real-time audio converter on the web

https://variation.app
1•khongchai•27m ago•0 comments

Kiro Crew

https://kiro.dev/crew/
1•trueduke•27m ago•0 comments

Show HN: Onshore – open-source data residency and data sovereignty solution

https://github.com/Onshore-HQ/onshore
1•ezehremigius•30m ago•0 comments

After the trace: what 1,085 Reddit comments reveal about debugging AI agents

https://traceroot.ai/blog/2026-10-06-after-the-trace-reddit-agent-debugging
1•ztan56•31m ago•0 comments

Toyota's top-selling car in Europe will become an EV, following the Corolla

https://electrek.co/2026/11/30/toyotas-top-seller-europe-become-ev-after-corolla/
1•cisc•31m ago•0 comments

Rebuilt StreetReaderAI Is Now Open Source

https://makeabilitylab.cs.washington.edu/news/rebuilt-streetreaderai-is-now-open-source/
1•01-_-•31m ago•0 comments

Nightshift: Plan, execute and review coding-agent work as files

https://github.com/orwa-mahmoud/nightshift
3•zachshallbetter•33m ago•0 comments

Design for Understandability – Schuster on Software

https://jschuster.org/blog/2026/11/19/design-for-understandability/
1•kiyanwang•34m ago•0 comments

How do you become known as a good engineer?

https://www.approachwithalacrity.com/p/how-do-you-become-known-as-a-good
1•kiyanwang•36m ago•0 comments

How Tyranny Works

https://www.theguardian.com/commentisfree/2026/nov/30/trump-silence-media
1•KingOfMyRoom•36m ago•0 comments

Megaspeed records reveal $13B in Nvidia deals with Alibaba unit

https://www.reuters.com/world/china/megaspeed-records-reveal-13-billion-nvidia-deals-with-alibaba...
4•01-_-•36m ago•0 comments

R/ClaudeCode: The files are editable

https://www.reddit.com/r/ClaudeCode/comments/1y65hxs/the_files_are_editable/
1•TechTechTech•38m ago•0 comments

Cognitive Debt in the GenAI Era – On the Loss of Understanding

https://arxiv.org/abs/2610.37888
3•lasky•38m ago•0 comments

It seems a Gemini ban might not be limited to just Gemini

https://flaviocopes.com/google-ai-account-bans/
6•nvmdbljstm•39m ago•3 comments

Maplibre-landmakrs: richer buildings on maplibre

https://github.com/am2222/maplibre-landmarks
1•maelito•42m ago•0 comments

The Cabinet of Keyboard Curiosities

https://datagubbe.se/keycurcab/
1•adunk•44m ago•0 comments

Hetzner Inference API

https://www.hetzner.com/ai/inference-api/
41•PaoloBarbolini•44m ago•9 comments

Italian court fines Netflix over movie joke about Michelangelo's David's

https://www.theguardian.com/world/2026/nov/30/netflix-italian-court-michelangelo-joke
1•dazhbog•46m ago•1 comments

Show HN: Pal Again – Turn an old iPhone or iPad into a Muse gadget

https://github.com/exrector/muse-gadget-ios
1•Exrector•48m ago•0 comments