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

Are AI agents a scam? [video]

https://www.youtube.com/watch?v=IOoLqw4n4_g
2•mgh2•6m ago•0 comments

I developed an alternative to Jira with Claude in 8 days, all by myself.

https://is.team
4•spotlayn•9m ago•1 comments

Tractors, beige boxes and what's next

https://agourlay.github.io/the-transmission/
1•agourlay•9m ago•0 comments

MiniMovie: An Anti-IMDB

https://minimovie.info/
3•ghostbit•11m ago•0 comments

Friendlier LLMs tell users what they want to hear – even when it is wrong

https://www.nature.com/articles/d41586-026-01153-z
2•takyamoto•11m ago•0 comments

Chinese hospitals are selling de-identified patient data to fuel the AI boom

https://asia.nikkei.com/spotlight/caixin/chinese-hospitals-are-selling-patient-data-to-fuel-the-a...
1•giuliomagnifico•19m ago•0 comments

How does your team handle cloud cost review – dedicated process or ad hoc?

https://www.kloudaudit.eu/
1•leumasj•21m ago•0 comments

Control AI Risk with Pre-Built Frameworks and Ready-to-Run Evaluations

https://atlas.latticeflow.ai/
1•duguyue100•27m ago•1 comments

Screw You, Realtek

https://www.growse.com/2026/05/02/screw-you-realtek.html
2•growse•31m ago•1 comments

China's Rare Defiance of US Sanctions Sparks Showdown over Banks

https://finance.yahoo.com/news/chinas-rare-defiance-of-us-sanctions-sparks-showdown-over-banks-02...
2•akyuu•31m ago•0 comments

Richard Feynman on Teaching (1986)

https://sites.pitt.edu/~druzdzel/feynman.html
4•lucidplot•32m ago•0 comments

When did stories become so centred on good battling evil? And why? [video]

https://aeon.co/videos/when-did-stories-become-so-centred-on-good-battling-evil-and-why
1•mblome•32m ago•0 comments

I have had this M5 Mac <48 hours and this happened when I moved the hinge

https://old.reddit.com/r/mac/comments/1t1qgqe/i_have_had_this_m5_mac_for_less_than_48_hours_and/
2•croes•36m ago•0 comments

I'm a contractor – I built a $9.99/mo Bluebeam alternative for Mac

https://clankoot.ai/studio
1•_abinesh_•41m ago•0 comments

Personal AI Health and Therapy Companion

https://hanahealth.co.uk/
1•jamesawallner•44m ago•0 comments

A Russian Family Was Isolated for 40 Years, Unaware of WWII (2013)

https://www.smithsonianmag.com/history/this-russian-family-lived-alone-in-the-siberian-wilderness...
2•downbad_•44m ago•1 comments

What went into the machine and what came out: single-line fonts and engraving

https://www.205.tf/articles/what-went-into-the-machine-and-what-came-out
1•fanf2•45m ago•0 comments

Over 8M Thermos jars and bottles recalled after 3 people lost vision

https://www.goodmorningamerica.com/living/story/8-million-thermos-jars-bottles-recalled-after-3-1...
13•taubek•46m ago•1 comments

The piracy paradox at Udemy (2015)

https://www.troyhunt.com/the-piracy-paradox-at-udemy/
1•downbad_•47m ago•1 comments

Amazon EC2 Beta (2006)

https://aws.amazon.com/blogs/aws/amazon_ec2_beta/
1•downbad_•52m ago•1 comments

The End of Violence

https://www.barnesandnoble.com/w/the-end-of-violence-gary-slutkin-md/1148640975
1•rendx•56m ago•0 comments

Blink – AI powered Search. A knowledge destination

https://blink-oi.vercel.app
1•Pascal1997•56m ago•1 comments

Google Says Prompt Injection Moving from Theory into Real Abuse

https://www.searchengineworld.com/google-says-prompt-injection-moving-from-theory-into-real-abuse
1•cromulent•57m ago•0 comments

How Does SaintQuant's AI Bot Enable 24/7 Crypto Trading?

https://www.bitdeal.net/crypto-trading-bot-development
1•harrisonrichrd•1h ago•0 comments

The Art of Thought (1926)

https://archive.org/details/theartofthought
1•georgestrakhov•1h ago•0 comments

A short-lived Linux box for every run

https://crabbox.sh
1•nor0x•1h ago•0 comments

UK Defence Tech Jobs for the week of 2026-05-04

https://defencetechjobs.substack.com/p/defence-tech-jobs-for-the-week-of-026
1•foxandlion•1h ago•0 comments

Does AI lead us back to a beautiful document based waterfall approach? [video]

https://www.youtube.com/watch?v=iW-4faoku8A
1•RebootStr•1h ago•0 comments

Show HN: Screen time, but with idle game mechanics

https://apps.apple.com/pl/app/oh-my-hours/id6760450002
1•jarko27•1h ago•0 comments

To fsync or not, that is a question

https://fractalbits.com/blog/to-fsync-or-not/
1•zzsheng•1h ago•0 comments