frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•10mo 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•10mo 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•10mo 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).

Banks, Treasury Staff Push Back on Citizen-Verification Proposal

https://news.bloomberglaw.com/banking-law/banks-treasury-staff-push-back-on-citizen-verification-...
1•petethomas•1m ago•0 comments

Show HN: Generate pannable, zoomable map websites for Rollercoaster Tycoon 2

https://github.com/leoherzog/openrct2-map
1•xd1936•2m ago•0 comments

Building a content system for solo founders with Claude Code

https://doneyli.substack.com/p/how-i-automated-my-wifes-content
1•hn247dj•3m ago•0 comments

BeatPaxos: Can you break the consensus protocol?

https://muratdem.github.io/BeatPaxos/
1•zdw•6m ago•1 comments

Ask HN: Solo Senior Developers, Where do we find you?

2•smalltorch•9m ago•0 comments

Agent Pilot is a platform where AI agents can review and discover other agents

https://agentreview.io
1•gauravsc•13m ago•0 comments

MiniMax Launches M2.7 Model on MiniMax Agent and APIs

https://www.testingcatalog.com/minimax-launches-m2-7-model-on-minimax-agent-and-apis/
1•gmays•13m ago•0 comments

Google is Not to be Trusted

1•data_skeptic•14m ago•0 comments

Keep Deterministic Work Deterministic

https://www.oreilly.com/radar/keep-deterministic-work-deterministic/
2•BerislavLopac•14m ago•0 comments

Mac OS X 25th Anniversary: The Foundation of Apple's Rise

https://www.goto10retro.com/p/mac-os-x-25th-anniversary-the-os
1•rbanffy•14m ago•0 comments

Show HN: Trading simulator with hidden dates to prove investment skill

https://www.juncturelab.com/
1•jtaylortech•15m ago•0 comments

Musk's tactic of blaming users for Grok sex images may be foiled by EU law

https://arstechnica.com/tech-policy/2026/03/eu-moves-to-ban-nudify-apps-after-grok-made-them-main...
2•rbanffy•15m ago•0 comments

Vibing in the Ruins

https://www.thenewatlantis.com/publications/vibing-in-the-ruins
1•simoes•18m ago•0 comments

Be intentional about how AI changes your codebase

https://aicode.swerdlow.dev
4•benswerd•18m ago•1 comments

Tools of the Trade: C2C Activation Offloading on Grace Blackwell

https://poolside.ai/blog/tools-of-the-trade-c2c-activation-offloading-on-grace-blackwell
1•matt_d•19m ago•0 comments

Nvidia on FAANG Layoffs

https://twitter.com/Ric_RTP/status/2034623376082284958
2•devInCamelCase•20m ago•0 comments

Code4z VS Code PL/I Language Extension Preprocessor Support

https://medium.com/modern-mainframe/code4z-vs-code-pl-i-language-extension-preprocessor-support-9...
1•rbanffy•23m ago•0 comments

Show HN: App Feedback Hub – A macOS App for Managing App Store Reviews

https://apps.apple.com/us/app/app-feedback-hub/id6759007525?mt=12
1•CreakHat•25m ago•0 comments

Tell HN: If working with agents means this, robots, please take my job

3•tiredagent•26m ago•2 comments

Which Path to Persia? Options for a New American Strategy Toward Iran (2009) [pdf]

https://www.brookings.edu/wp-content/uploads/2016/06/06_iran_strategy.pdf
1•Jimmc414•26m ago•1 comments

How death came to haunt my desert island

https://www.thetimes.com/uk/crime/article/how-death-came-to-haunt-my-desert-island-f7j2gf8kmhp
1•lerela•26m ago•2 comments

The Free SVG Logo Maker

https://svglogo.dev/
1•theorchid•27m ago•0 comments

The Need for an Independent AI Grid

https://amppublic.com/
4•olalonde•28m ago•0 comments

Xiaomi launches next-gen SU7 with 902 km range and Lidar, still undercuts Tesla

https://electrek.co/2026/03/19/xiaomi-launches-next-gen-su7-902-km-range-undercuts-tesla/
6•breve•29m ago•0 comments

Shown HN: Mittens for Claw – Go sandbox to safely run local AI agents

https://github.com/oug-t/mittens
1•x-guo•31m ago•1 comments

Ask HN: Are we ready for vulnerabilities to be words instead of code?

2•lielcohen•34m ago•4 comments

The True Cost of Grade Inflation at Harvard

https://www.harvardmagazine.com/university-news/harvard-grade-inflation-faculty-marks
2•Bostonian•34m ago•0 comments

The Onion's Exclusive Interview with Sam Altman

https://theonion.com/the-onions-exclusive-interview-with-sam-altman/
2•rendx•35m ago•0 comments

If you ever mention AI again, I'll [redacted]

https://ludic.mataroa.blog/blog/i-will-fucking-piledrive-you-if-you-mention-ai-again/
4•pixxa•35m ago•0 comments

The use of AI in writing is perfectly fine

https://greyenlightenment.com/2026/03/16/no-matt-walsh-the-use-of-ai-in-writing-is-perfectly-fine/
2•paulpauper•35m ago•0 comments