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

Readers Prefer AI Trained on Copyrighted Books over Expert Human Writers

https://arxiv.org/abs/2510.13939
1•Anon84•29s ago•0 comments

Snowflake Adaptive Warehouses cut MERGE write amplification [video]

https://www.youtube.com/shorts/LeAS6TR-dxA
1•yanivleven•1m ago•0 comments

An attempt at making a Visual Place Recognition system work on Lunar surfaces

https://www.lunarsim.org/research/
1•RonInDune•1m ago•1 comments

Show HN: On Air – Press a key and a reaction plays on your webcam in calls

https://forgot.dev/on-air
1•petarjs•1m ago•0 comments

Pixtorium – a native AI image editor, not a Photoshop clone

https://pixtorium.com/
1•siberiankot•2m ago•0 comments

Microsoft is offering buyouts to around 60k employees

https://www.businessinsider.com/microsoft-is-offering-buyouts-read-the-memo-2026-10
3•nycdatasci•2m ago•0 comments

Ask HN: Who is doing distillation or fine tuning?

1•mrburton•2m ago•1 comments

DuckDuckGo Donates $25,000 to The Perl and Raku Foundation v2026

https://www.perl.com/article/duckduckgo-donates-25-000-to-the-perl-and-raku-foundation-v2026/
2•oalders•3m ago•0 comments

Moatless – App stores are dead. Buy the code

https://moatless.store/blog/announcing-moatless
3•lawik•6m ago•1 comments

The Case Against Business School

https://www.nytimes.com/2026/10/18/opinion/business-school-mba-harvard-cornell-cambridge.html
1•yarapavan•6m ago•0 comments

Bad Habits in Web Development We Should Avoid

https://blog.ifirestone.dev/bad-habits-in-web-development-we-should-avoid/
1•theanonymousone•6m ago•0 comments

Chip Wars Update: China blows up ASML's supply chain for EUV machines [video]

https://www.youtube.com/watch?v=sPjPaHmQ8JE
1•xbmcuser•7m ago•0 comments

Microsoft to Trim Workforce with Buyout Offers for 60k Staff

https://www.bloomberg.com/news/articles/2026-10-26/microsoft-to-offer-buyouts-to-60-000-workers-i...
3•helsinkiandrew•7m ago•1 comments

Show HN: Cues Video Editor

https://cues.app
1•chaitanyapandit•8m ago•0 comments

Why Just Passwords?

https://pketh.org/why-just-passwords.html
1•surprisetalk•9m ago•0 comments

Geospatial Wikidata Dataset Connects OpenStreetMap and Wikimedia for Re

https://enterprise.wikimedia.com/blog/geospatial-wikidata-dataset/
2•chippy•10m ago•0 comments

Heavenly delights of hashing numbers under EQUALP

https://turtleware.eu/posts/Heavenly-delights-of-hashing-numbers-under-EQUALP.html
1•jackdaniel•10m ago•1 comments

Show HN: Give one context across all your agents via MCP

https://make0.ai/
1•heysrb•10m ago•1 comments

Show HN: RCE in Atlantis

https://medium.com/@Vulnetic-CEO/dismissed-approval-to-rce-unreviewed-terraform-apply-in-atlantis...
2•danieltk76•11m ago•0 comments

Show HN: Cfnrain, a community fork of AWS's archived CloudFormation CLI rain

https://github.com/awesome-foundation/cfnrain
1•allixsenos•12m ago•0 comments

Show HN: Offline PDF Desk – one HTML file, redacts and merges PDFs offline

https://dowla0.gumroad.com/l/offline-pdf-desk
1•Vladenik•12m ago•0 comments

Supply chain security for open source maintainers

https://safedep.io/oss/
2•tech_solver•13m ago•0 comments

Empires of AI

https://www.foreignaffairs.com/china/empires-artificial-intelligence-niall-ferguson-eric-schmidt
1•simonebrunozzi•13m ago•0 comments

Microsoft offers mass buyouts for roughly a quarter of its workforce

https://www.seattletimes.com/business/microsoft/microsoft-offers-mass-buyouts-for-roughly-a-quart...
18•doctorzook•14m ago•10 comments

Eric Bauza, Voice of Bugs Bunny and Daffy Duck, Dies at 46

https://www.washingtonpost.com/nation/2026/10/26/eric-bauza-voice-looney-tunes-characters-bugs-bu...
5•bookofjoe•16m ago•2 comments

Lead Harbour, find people asking to buy what your online store sells

https://leadharbour.tech/
2•raysyarov•16m ago•0 comments

Ask HN: What are your creative context bombs to make AI agents pay?

1•reacharavindh•16m ago•0 comments

Matthew Butterick makes an excellent point about textbook sizes [video]

https://www.youtube.com/watch?v=W-ryv6TwQvM
1•starmftronajoll•17m ago•0 comments

CEO

https://www.mobluehq.com/portfolio/bluemonster
1•adamfaust•18m ago•0 comments

That free beer has a brewer

https://bytecode.news/posts/2026/10/that-free-beer-has-a-brewer
1•Teckla•18m ago•0 comments