frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•1y 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•1y 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•1y 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).

1•dmckinno•31s ago

Microbes could survive on Saturn's moon Enceladus

https://www.space.com/space-exploration/search-for-life/microbes-could-survive-on-saturns-moon-en...
1•pseudolus•1m ago•0 comments

Ask HNs: where should I get a valuation of my application?

1•lakeeffect•2m ago•0 comments

The Model Is the Easy Half

https://github.com/wilsonwu-ai/the-model-is-the-easy-half
1•wilsonwu8•3m ago•1 comments

Moloch: Tristan Harris' new cautionary short film about the AI race [video]

https://www.youtube.com/watch?v=Q4aUidMZxbs
1•NickNaraghi•4m ago•0 comments

A skeptic's first contact with Kubernetes

https://blog.davidv.dev/posts/first-contact-with-k8s/
1•pmoriarty•9m ago•0 comments

Bill Gates's Blunt Warning on A.I

https://www.nytimes.com/2026/09/29/opinion/ezra-klein-podcast-bill-gates.html
2•OZYMANDIASAK•13m ago•0 comments

Vibe Coding Discover – A Catalog of AI OSS for Agents, MCP, Skills, RAG

https://vibecodingdiscover.com
1•wilsonye•14m ago•0 comments

Show HN: InfiniHash App Store – compliance tools built end-to-end by AI agents

https://apps.infinihash.com/
1•jlvardon•15m ago•0 comments

Show HN: EventSend – Event tracking and routing for solo founders and SaaS teams

https://eventsend.io/
1•mytinyrocket•17m ago•0 comments

Goals, facts, capabilities. Never remedies

https://www.fillmore.is/blogging/no-remedies
2•s16h•19m ago•1 comments

I count 600k live job ads nightly – 34k claim to be over a year old

https://jobs.tun-ai.com/insights
1•praveenpanduuk•21m ago•0 comments

Show HN: I created a BGP-based blackhole system that you can set up in minutes

https://setecastronomyinc.com/shield
2•jkalbfeld•21m ago•0 comments

Chinese AI tool told researchers how to make bioweapons

https://www.bbc.com/news/articles/cmrergq3j7lgo
2•pluc•21m ago•0 comments

Preventing quantum downgrade attacks against IPsec

https://blog.cloudflare.com/ipsec-downgrade-protection/
1•bbg2401•24m ago•0 comments

"All Wars Are Bankers' Wars "

https://whatreallyhappened.com/WRHARTICLES/allwarsarebankerwars.php
1•axiologist•25m ago•1 comments

Most powerful obesity drug yet: People lost up to 25% of weight in trial

https://arstechnica.com/health/2026/09/most-powerful-obesity-drug-yet-people-lost-up-to-25-of-wei...
1•jnord•26m ago•0 comments

Recast WOOF: High Resolution GPU powered numerical weather simulations

https://sf.recastsystems.com
2•roastedpillows•29m ago•0 comments

Historical Burdens on Physics (2022) [pdf]

https://www.karlsruher-physikkurs.de/download/historical_burdens-2022.pdf
1•vitalnodo•29m ago•0 comments

AI does, and does not, change the way I do math

https://terrytao.wordpress.com/2026/09/29/how-ai-does-and-does-not-change-the-way-i-do-math/
1•smilelamp•29m ago•0 comments

California Virtual Power Plant

https://www.tesla.com/vpp/california
1•andsoitis•32m ago•0 comments

Build Freely: Non-AI Shed Plan Generator

https://buildfreely.com/
1•darkstar999•38m ago•0 comments

They're trying to build a digital God and then enslave it

https://www.reddit.com/r/stocks/comments/1wtdg4w/comment/pct6bsp/
1•remywang•38m ago•0 comments

I Redesigned My Courses Around Notebooks

https://jillianhess.substack.com/p/why-i-redesigned-my-courses-around
1•herbertl•40m ago•0 comments

Firefox's chief on why he hopes a redesign will help win users from Chrome

https://arstechnica.com/gadgets/2026/09/mozillas-head-of-firefox-talks-product-priorities-ai-skep...
4•walrus01•41m ago•5 comments

Custom malware used in Citrix 0-day attacks targeting govt, banks, professional

https://www.theregister.com/security/2026/09/29/custom-malware-used-in-citrix-0-day-attacks-targe...
1•sbulaev•43m ago•0 comments

Olomni (Olomni Agent)

https://www.olomni.com/
1•FaustoDario33•43m ago•0 comments

Mathematicians Harness Randomness to Crack a 55-Year-Old Conjecture

https://www.quantamagazine.org/mathematicians-harness-randomness-to-crack-a-55-year-old-conjectur...
1•tzury•45m ago•0 comments

Show HN: Social news aggregator, RSS feed tracker, and publishing platform

https://rsscal.com/
2•Dotnaught•45m ago•0 comments

CISA scraps 6 free cybersecurity assessments for infrastructure operators

https://www.cybersecuritydive.com/news/cisa-cybersecurity-assessments-ending/829371/
1•geox•45m ago•0 comments