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

Novo Nordisk reports cyberattack as UK gives Wegovy pill the nod

https://www.theregister.com/security/2026/06/12/novo-nordisk-says-hackers-stole-clinical-trial-da...
1•jruohonen•2m ago•0 comments

Show HN: Skill for your agent to visualize your gbrain and Obsidian

https://github.com/vladignatyev/brain-map-skill
1•v_ignatyev•2m ago•0 comments

Weaker bonds make for more impact-resistant polymers

https://newatlas.com/materials/weaker-bonds-impact-resistant-polymers/
1•breve•4m ago•0 comments

Yoti does not report GrapheneOS users to the authorities

https://www.yoti.com/blog/yoti-does-not-report-grapheneos-users-to-the-authorities/
2•Cider9986•5m ago•0 comments

Musk's War on European Democracy

https://ecfr.eu/article/musks-war-on-european-democracy-how-to-open-up-x-and-fight-back/
3•jruohonen•5m ago•0 comments

Estimating No-Cot Task-Completion Time Horizons of Frontier AI Models

https://www.lesswrong.com/posts/SieLowPgNgRSPGhFw/estimating-no-cot-task-completion-time-horizons...
1•kqr•8m ago•0 comments

Norway to deploy largest fleet of 'flying' electric ferries

https://candela.com/newsroom/norway-to-deploy-worlds-largest-fleet-of-flying-electric-ferries/
1•robin_reala•10m ago•0 comments

Looksy – we research and contact vendors so you don't have to

https://looksy.fyi/blogs/blog/hidden-cost-of-doing-your-own-research
2•sean_looksy•19m ago•0 comments

Dwile flonking returns, but what on Earth is it?

https://www.bbc.co.uk/news/articles/c621z76yvy1o
1•zeristor•21m ago•1 comments

Show HN: Visualize an Obsidian/gbrain vault as an interactive graph and timeline

https://vladignatyev.github.io/brain-map-skill/
2•v_ignatyev•21m ago•1 comments

Parasitic Computing

https://en.wikipedia.org/wiki/Parasitic_computing
1•the-mitr•24m ago•0 comments

lmcli v0.7.0 – TUI harness with smooth performance up to 1M context

https://codeberg.org/mlow/lmcli
1•wolttam•27m ago•1 comments

ArkVault – Per-user ZFS snapshots for managed Nextcloud hosting

https://arkdisk.com/
1•ChristopherArk•30m ago•0 comments

Not Your Weights, Not Your Workflow (Claude Fable 5 Export Ban)

https://thecoder.io/blog/not-your-weights
4•pixelhed•31m ago•2 comments

Map Clustering Is Not My Favorite

https://blog.greg.technology/2026/06/12/map-clustering-is-not-my-favorite.html
1•gregsadetsky•33m ago•0 comments

Blog of http://archive.today/

https://lj.rossia.org/users/archive_today/
1•Cider9986•38m ago•1 comments

Fisher Catches and Releases Great White Shark in Massachusetts [video]

https://www.youtube.com/watch?v=yFIcUT8Q1RU
1•aquir•48m ago•0 comments

Leaving Mozilla

https://blog.unitedheroes.net/5751
2•martey•49m ago•0 comments

Show HN: GripLock – walk in real life to conquer terrain

https://griplock.alephz.com/
2•ishener•50m ago•0 comments

Harness engineering for coding agent users

https://martinfowler.com/articles/harness-engineering.html
2•pramodbiligiri•54m ago•0 comments

Russian mathematician wanted on terrorism charges detained in Armenia

https://caliber.az/en/post/russian-mathematician-wanted-on-terrorism-charges-detained-in-armenia
2•spzx•54m ago•1 comments

Shepherd's Dog: A Game by the Most Dangerous AI Model

https://koenvangilst.nl/lab/claude-fable-shepherds-dog
14•vnglst•1h ago•8 comments

Show HN: FinMind AI – Like Bloomberg Terminal Meets ChatGPT

https://finmindai-moneyverse.vercel.app/
1•heroboy•1h ago•0 comments

Ask HN: What features do you miss in Google Docs for desktop?

2•mci•1h ago•1 comments

Too many people are shockingly bad at prioritisation

https://economist.com/business/2026/06/11/too-many-people-are-shockingly-bad-at-prioritisation
1•andsoitis•1h ago•0 comments

Mise System Packages

https://mise.jdx.dev/system-packages/
4•crbelaus•1h ago•0 comments

The Touch of God

http://bryanhu.com/blog/posts/the-touch-of-god/
1•thatxliner•1h ago•0 comments

How Musk's tactics left investors clamoring for SpaceX stock and ignoring risks

https://www.reuters.com/legal/transactional/how-musks-tactics-left-investors-clamoring-spacex-sto...
5•1vuio0pswjnm7•1h ago•1 comments

Active AUR malicious packages incident

https://archlinux.org/news/active-aur-malicious-packages-incident/
4•wanderer2323•1h ago•1 comments

Even "illegible" Mythos reasoning traces seem pretty legible

https://www.lesswrong.com/posts/wCSEpT3dTGz4N86Wi/even-illegible-mythos-reasoning-traces-seem-pre...
4•kqr•1h ago•0 comments