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

Airbus Likely Provided Satellite Imagery of US Military Assets to China Before

https://chinaselectcommittee.house.gov/media/press-releases/airbus-space-likely-provided-satellit...
1•737min•30s ago•0 comments

Agentic Infrastructure

https://vercel.com/blog/agentic-infrastructure
1•gmays•42s ago•0 comments

Inside Notion

https://colossus.com/article/inside-notion/
1•herbertl•1m ago•0 comments

Witter Coin to host a $50k coin scavenger hunt in SF

https://www.wittercoin.com/
1•nvader•7m ago•0 comments

Worldmonitor: Real-time global intelligence dashboard

https://github.com/koala73/worldmonitor
1•quux0r•9m ago•0 comments

Show HN: AI Subroutines – Run automation scripts inside the browser tab

https://www.rtrvr.ai/blog/ai-subroutines-zero-token-deterministic-automation
3•arjunchint•9m ago•1 comments

Focused microwaves allow 3D printers to fuse circuits onto almost anything

https://newatlas.com/electronics/meta-nfc-focused-microwaves-circuits/
1•breve•9m ago•0 comments

Opus 4.7 refuses to solve NYT Connections puzzles

https://twitter.com/LechMazur/status/2044970170347622727
1•MallocVoidstar•12m ago•1 comments

"Project Hail Mary's" Success: A Story You Can Believe In

https://www.civitasoutlook.com/research/project-hail-marys-success-a-story-you-can-believe-in-fca...
1•RickJWagner•15m ago•0 comments

Stitch – Google's AI design tool

https://stitch.withgoogle.com/
1•satvikpendem•16m ago•0 comments

Glyph Protocol for Terminals

https://rapha.land/introducing-glyph-protocol-for-terminals/
1•coderlovernine•16m ago•0 comments

Tesla Roadstar does not even have a release date so how is that not real fraud?

https://www.tesla.com/roadster
2•kingleopold•16m ago•1 comments

Agile Is Dying

https://twitter.com/helloteban/status/2045244584880451748
3•baristaGeek•18m ago•1 comments

Wild Gunman: Resurrecting Nintendo's First Coin-Op on Its 50th Anniversary [video]

https://www.youtube.com/watch?v=TOfqnomGPkM
1•kitcar•20m ago•0 comments

I reversed Opus 4.7 costs

https://github.com/LucasDuys/forge
1•lucasduys•24m ago•0 comments

Fulu bounty for Ring Camera jailbreak reaches $23k

https://bounties.fulu.org/bounties/ring-video-doorbells
2•SomaticPirate•24m ago•0 comments

The new World ID and the partners bringing proof of human to the internet

https://world.org/blog/announcements/the-new-world-id-and-the-partners-bringing-proof-of-human-to...
2•spondyl•25m ago•0 comments

Show HN: Realtime Voice AI on ESP32 with Cloudflare Durable Objects

https://github.com/akdeb/ElatoAI/tree/main/server/cloudflare
1•akadeb•29m ago•0 comments

Change management problem rarely mentioned when pushing AI to engineering teams

https://shiftmag.dev/as-an-engineering-manager-i-couldnt-ignore-ai-if-my-teams-are-to-survive-9061/
1•cyberkoza•30m ago•2 comments

Cerebras S-1

https://www.sec.gov/Archives/edgar/data/2021728/000162828026025762/cerebras-sx1april2026.htm
10•herpderperator•30m ago•0 comments

Why, After All These Years, MZI-Based Transistorlessness Might Be Here

https://write.as/mnggfj7asl07k
1•rbanffy•32m ago•0 comments

Opinion 195

https://sites.math.rutgers.edu/~zeilberg/Opinion195.html
1•paulpauper•32m ago•0 comments

The N.Y.P.D. Is Teaching America How to Track Everyone Every Day Forever

https://www.nytimes.com/interactive/2025/09/15/opinion/nypd-surveillance.html
4•Cider9986•33m ago•1 comments

The Arctic's growing mosquito problem

https://www.science.org/doi/10.1126/science.aeh9505
1•ChrisArchitect•33m ago•0 comments

Meta targets May 20 for first wave of layoffs; additional cuts later in 2026

https://www.reuters.com/world/meta-targets-may-20-first-wave-layoffs-additional-cuts-later-2026-2...
6•fvrghl•35m ago•3 comments

Listening in on the brain's electrical conversations with better tools

https://medicalxpress.com/news/2026-03-brain-electrical-conversations-tools.html
1•PaulHoule•37m ago•0 comments

Show HN: Jean2 – An Open-Source Agent You Assemble Like Lego

https://github.com/rabbyte-tech/jean2
1•danielbilekq•39m ago•1 comments

Sam Altman Is Dangerously Disconnected from Reality

https://weaponizedspaces.substack.com/p/sam-altman-is-dangerously-disconnected
3•rbanffy•40m ago•0 comments

Composing a Search Engine

https://exa.ai/blog/composing-a-search-engine
1•metadat•40m ago•0 comments

What if database branching was easy?

https://xata.io/blog/what-if-database-branching-was-easy
1•tee-es-gee•42m ago•0 comments