frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•11mo 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•11mo 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•11mo 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 Can Accelerate Developer Growth (If You Use It Right)

https://aroussi.com/post/from-junior-to-10x-dev
1•merusame•1m ago•0 comments

Tumour cells use a genetic trick to become drug-resistant

https://www.economist.com/science-and-technology/2026/04/16/tumour-cells-use-a-genetic-trick-to-b...
1•marojejian•3m ago•1 comments

Show HN: Immediate Mediation WebAuthn on Django

https://github.com/mkalioby/django-passkeys
1•mkalioby•5m ago•0 comments

Memory Scaling for AI Agents

https://www.databricks.com/blog/memory-scaling-ai-agents
1•eigenBasis•6m ago•0 comments

Who Would Believe NASA Used Whale Oil on Voyager and Hubble? (2014)

https://ksj.mit.edu/tracker-archive/who-would-believe-nasa-used-whale-oil-vo/
1•Amorymeltzer•7m ago•0 comments

US 'Golden Shield' Takes Form in First Exercise with Micro-Missile Interceptors

https://nextgendefense.com/us-golden-shield-exercise/
2•geox•10m ago•0 comments

Building a Claude Code Skill Plugin from Scratch

https://franchb.com/posts/building-claude-code-skill-plugins/
1•ironmagma•12m ago•0 comments

Show HN: MechCloud – We killed the Terraform state file

https://mechcloud.io
1•koyadume•13m ago•0 comments

Headless Everything for Personal AI

https://interconnected.org/home/2026/04/18/headless
3•markusw•18m ago•1 comments

Apple TV's Upcoming Cyberpunk Series Will Be the Matrix Meets Blade Runner

https://screenrant.com/neuromancer-apple-tv-matrix-meets-blade-runner/
3•mindcrime•21m ago•0 comments

Berlin offers free entry for litter picking to make tourists do their bit

https://www.euronews.com/my-europe/2026/04/16/berlin-offers-free-entry-for-litter-picking-to-make...
1•ohjeez•21m ago•0 comments

TSA Bans This Knife at Checkpoint – Then Airlines Hand It to You on Plane

https://viewfromthewing.com/tsa-bans-this-knife-at-the-checkpoint-then-airlines-hand-it-to-you-on...
3•bookofjoe•24m ago•0 comments

Ask HN: Does magic link authentication use HTML canvassing?

1•trinsic2•27m ago•1 comments

SF is obsessed with the safest drivers and ignoring the ones killing people

https://www.sfchronicle.com/opinion/openforum/article/pedestrian-death-driver-accident-22210904.php
2•aranchelk•29m ago•0 comments

Write Code Like You Just Learned How to Program

https://prog21.dadgum.com/87.html
4•tosh•29m ago•1 comments

Salesforce launches Headless 360 turn platform in infrastructure for AI agents

https://venturebeat.com/ai/salesforce-launches-headless-360-to-turn-its-entire-platform-into-infr...
3•ulrischa•32m ago•0 comments

Bluetooth tracker in a postcard and mailed to a warship exposed its location

https://www.tomshardware.com/tech-industry/cyber-security/bluetooth-tracker-hidden-in-a-postcard-...
5•tcp_handshaker•32m ago•0 comments

Trump, When Asked About White House Meeting with Anthropic's Dario Amodei: Who?

https://gizmodo.com/trump-when-asked-about-white-house-meeting-with-anthropics-dario-amodei-who-2...
4•ulrischa•33m ago•0 comments

Too many tools or tool overload

https://devcyc.life/too-many-tools-or-tool-overload/
3•lilerjee•35m ago•0 comments

IMF says America's $39T national debt is a global problem

https://finance.yahoo.com/economy/policy/articles/world-going-broke-imf-says-194850050.html
4•tcp_handshaker•35m ago•0 comments

Shared Dictionaries: compression that keeps up with the agentic web

https://blog.cloudflare.com/shared-dictionaries/
4•Brajeshwar•38m ago•0 comments

Show HN: DOMPrompter – click a DOM element, get a structured AI coding prompt

3•witnote•39m ago•0 comments

List of people imprisoned for editing Wikipedia

https://en.wikipedia.org/wiki/List_of_people_imprisoned_for_editing_Wikipedia
7•lr0•40m ago•0 comments

Phantom Camerawork: Star Wars: Episode I – The Phantom Menace (1999)

https://theasc.com/magazine/sept99/phantom/index.htm
2•exvi•41m ago•0 comments

SpaceX Files FCC Complaint over Ariane 64 Amazon Leo Launch

https://europeanspaceflight.com/spacex-files-fcc-complaint-over-ariane-64-amazon-leo-launch/
3•tcp_handshaker•43m ago•0 comments

The AI stack trap: the hidden cost of overbuilding with AI

https://www.forbes.com/sites/abdoriani/2026/01/24/the-ai-stack-trap-the-hidden-cost-of-overbuildi...
1•DrZootron•44m ago•0 comments

Welcome to the Machine: The Matrix (1999)

https://theasc.com/magazine/apr99/matrix/index.htm
3•exvi•44m ago•0 comments

4-bit floating point FP4

https://www.johndcook.com/blog/2026/04/17/fp4/
2•chmaynard•47m ago•1 comments

Comparing GPT-5.4, Opus 4.6, GLM-5.1, Kimi K2.5, MiMo V2 Pro and MiniMax M2.7

https://www.codejam.info/2026/04/comparing-gpt-5-4-opus-4-6-glm-5-1-kimi-k2-5-mimo-v2-pro-and-min...
1•funkyval•49m ago•0 comments

Two $20B: OpenAI and Nvidia in a 'Reasoning Battle'

https://jianshiapp.com/two-20-billion-openai-and-nvidia-in-a-reasoning-battle/
2•ninjahawk1•52m ago•0 comments