frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Hitting the High Notes (2005)

https://www.joelonsoftware.com/2005/07/25/hitting-the-high-notes/
1•benatkin•4m ago•0 comments

Show HN: What zero-intervention E2E test generation looks like

https://www.youtube.com/watch?v=G6mtaC15ocw
1•nadeem1•5m ago•0 comments

Neolab and Emerging AI Lab Tracker

https://cleverhack.com/neolab-and-emerging-ai-lab-tracker
1•jxmorris12•7m ago•0 comments

"Clinejection" Turned an AI Bot into a Supply Chain Attack

https://snyk.io/blog/cline-supply-chain-attack-prompt-injection-github-actions/
1•vismit2000•10m ago•0 comments

Show HN: Managed S3 exports for billing data (no AWS setup required)

https://flexprice.io/
3•manishfp•13m ago•0 comments

Coruna: The Mysterious Journey of a Powerful iOS Exploit Kit

https://cloud.google.com/blog/topics/threat-intelligence/coruna-powerful-ios-exploit-kit
1•mitchbob•15m ago•0 comments

Vibe Security Radar – Tracking the security cost of vibe coding

https://vibe-radar-ten.vercel.app
1•guessmyname•19m ago•0 comments

Spark Runner: Easily Automate Front End Tests

https://github.com/simonarthur/spark-runner/
1•chromaton•22m ago•1 comments

I built this privacy-focused analytics tool

1•webanalyzerapp•22m ago•0 comments

"Game Development in Eight Bits" by Kevin Zurawel (2021) [video]

https://www.youtube.com/watch?v=TPbroUDHG0s
1•vinhnx•24m ago•0 comments

open_slate: A Powerful and Private 2-in-1 Tablet

https://www.indiegogo.com/en/projects/braxtechnologies/open_slate
1•owenpalmer•25m ago•0 comments

Converting Binary Floating-Point Numbers to Shortest Decimal Strings

https://onlinelibrary.wiley.com/doi/10.1002/spe.70056
1•matt_d•27m ago•0 comments

The era of Doctor AI is here

https://www.axios.com/2026/03/06/ai-doctor-health-information-consumers
2•0in•28m ago•0 comments

Show HN: Context-compact – Summarize agent context instead of truncating it

https://github.com/HalfEmptyDrum/Context-Compactor
6•EmptyDrum•28m ago•2 comments

Coding Agents in Feb 2026

https://calv.info/agents-feb-2026
1•vinhnx•37m ago•0 comments

Calif. lawsuit accuses Meta of sending nude video from AI glasses to workers

https://www.sfgate.com/tech/article/meta-ai-glasses-lawsuit-21960004.php
2•bryan0•37m ago•0 comments

Anthropic and The Pentagon

https://www.schneier.com/blog/archives/2026/03/anthropic-and-the-pentagon.html
1•herbertl•37m ago•0 comments

Show HN: Crypto data API where AI agents pay per request with USDC (x402)

https://crypto-enrich.up.railway.app
1•psamala•42m ago•0 comments

The first AI counter surveillance app

https://play.google.com/store/apps/details?id=app.sentryrf&hl=en_US
2•vidoluc•43m ago•1 comments

Loop Conference Channel [YouTube]

https://www.youtube.com/channel/UC_QIfHvN9auy2CoOdSfMWDw
1•vinhnx•44m ago•0 comments

The Mystery of Asjo.org

https://acid.vegas/blog/the-mystery-of-asjo-org/
1•gzread•46m ago•0 comments

How College Admissions Officers Spot Over-Coached Applications

https://www.forbes.com/sites/christopherrim/2026/02/27/how-college-admissions-officers-spot-over-...
2•paulpauper•47m ago•0 comments

Our Hospice System Subverts the Point of Hospice Care

https://www.nytimes.com/2026/03/02/opinion/hospice-care.html
2•paulpauper•47m ago•0 comments

SEIU Delenda Est

https://www.astralcodexten.com/p/seiu-delenda-est
3•paulpauper•49m ago•0 comments

Tell HN: Azure Data Factory pipeline execution delays in East US 2

1•dwoldrich•50m ago•0 comments

Show HN: ByeBrief – a local-first AI investigation canvas

https://github.com/byte271/ByeBrief/
1•yihac1•51m ago•0 comments

The Differentiated Engineer in the Era of Automated Development

https://substack.com/home/post/p-190017259
1•Carsten_Peters•51m ago•0 comments

Defense Devaluation – Starlink on American Drones

https://en.topwar.ru/278903-devalvacija-oborony-starlink-na-amerikanskih-dronah.html
1•B1FF_PSUVM•51m ago•0 comments

India Plans 30% Slash in Thermal Coal Imports This Year

https://oilprice.com/Latest-Energy-News/World-News/India-Plans-30-Slash-in-Thermal-Coal-Imports-T...
2•PaulHoule•51m ago•0 comments

I made a programming language with M&Ms

https://mufeedvh.com/posts/i-made-a-programming-language-with-mnms/
1•mufeedvh•52m ago•0 comments