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

The 3DS Oracle: Bin Attack via the Network

https://arxiv.org/abs/2610.32206
1•cswasif•1m ago•0 comments

ThreatLens v2.3 Is Now Live Introducing Privacy Controls, IOC Watchlist

https://github.com/AbdaullahAG/ThreatLens
1•AbdallahAG•2m ago•0 comments

Make Quizzes with Your Friends

https://www.instagram.com/reel/DdpRlfdpBpk/
1•E-Reverance•2m ago•1 comments

AI Rap Video

https://www.memeaivideo.com
1•daisyjin•2m ago•0 comments

New Python security updates explicitly block the eMudhra certificates by SPKI

1•zahlman•4m ago•0 comments

Copyparty – file sharing server in a single Python file

https://copyparty.eu/
3•jllyhill•5m ago•1 comments

Sweden: Europe's most useful electric vehicle test case

https://omev.se/2026/10/27/sweden-europes-most-useful-electric-vehicle-test-case/
1•DamonHD•6m ago•0 comments

More additional blog posts and articles

https://terrytao.wordpress.com/2026/10/26/more-additional-blog-posts-and-articles/
1•smilelamp•6m ago•0 comments

Show HN: Crenox – Fast Git Secret Scanner

https://github.com/crenoxhq/crenox
1•SENTINEL_888•6m ago•0 comments

A technical architecture decision tree for SAP Clean Core and S/4HANA migrations

https://medium.com/@snake09031999/tired-of-clean-core-buzzword-slides-the-technical-decision-tree...
1•AndreaAntonioPe•6m ago•0 comments

Vienna Gödel Lecture 2026: Geoffrey Hinton [video]

https://www.youtube.com/watch?v=TNffIt8eRb0
1•Schlagbohrer•9m ago•0 comments

Eurocracy: The Game

http://eurocracy.xyz/
1•Trickery5837•10m ago•0 comments

GI Moment in Test

https://testflight.apple.com/join/2bw27SdQ
1•justinlu666•12m ago•0 comments

Whoops: Meta's Muse Share Links Disclosed All Sorts of Super-Sensitive User Data

https://www.techdirt.com/2026/10/26/whoops-metas-muse-share-links-disclosed-all-sorts-of-super-se...
1•beardyw•15m ago•2 comments

Adaptive UI and docs using in-browser inference

https://passo.uno/adaptive-ui-docs-using-llms/
2•theletterf•18m ago•0 comments

RandComp Studio – run a team of AI coding agents on your own machine

https://randcomp.io/mission-control-site/
1•tyrelltle•19m ago•0 comments

Britain bets big on AI to defend against the threats AI is helping create

https://www.theregister.com/security/2026/10/26/britain-bets-big-on-ai-to-defend-against-the-thre...
3•beardyw•22m ago•0 comments

A simplified proof of ETH is False [pdf]

https://shivakintali.github.io/papers/ETH.pdf
2•porridgeraisin•23m ago•0 comments

Rare Earths – Production, Reserves and Supply Concentration

https://criticalmineralsdata.org/rare-earths
1•s9beam•30m ago•0 comments

Open-XY: Custom Firmwares for the Teenage Engineering OP-XY

https://github.com/etcetc000/open-xy
1•jphorism•31m ago•0 comments

“AI Skills” are worthless in 2026

https://fishbowl.pastiche.org/2026/10/26/ai-skills
2•saikatsg•35m ago•1 comments

Cuis: The Modern Smalltalk-80

https://cuis.st/
2•theanonymousone•35m ago•0 comments

Documentation quality is your AI quality now

https://ben.balter.com/2026/10/26/documentation-quality-is-ai-quality/
1•benbalter•38m ago•1 comments

Why remote roles are becoming extinct in 2026?

1•rohansrma•40m ago•5 comments

The Mythical Man-Month in the Age of AI

https://j11g.com/the-mythical-man-month-in-the-age-of-ai
1•ilreb•43m ago•0 comments

ChatGPT leaked users' data, and nobody hacked it

https://trustboundarystudio.com/posts/chatgpt-redis-leak-2023/
5•trustboundaryst•45m ago•0 comments

Mapping the landscape of software vulnerabilities in connected vehicles

https://link.springer.com/article/10.1007/s11219-026-09787-y
1•mikae1•48m ago•0 comments

Gram Editor

https://codeberg.org/GramEditor/gram
1•saikatsg•48m ago•0 comments

Show HN: OddsLine – Football betting analytics with market-independent model

https://oddsline.io/mls-predictions-today/
1•PhiloPark•49m ago•0 comments

ICE plan to buy robot dogs spurs protest from Boston Dynamics employees

https://arstechnica.com/ai/2026/10/boston-dynamics-employees-want-to-block-sale-of-robot-dogs-to-...
5•dataflow•49m ago•0 comments