frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•6mo 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•6mo 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•6mo 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).

AI just proved Erdos Problem #124

https://twitter.com/vladtenev/status/1994922827208663383
1•nl•6m ago•0 comments

Decoding Ageing: Blueprint Theory of Ageing [video]

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

Show HN: LLM Newsletter Kit – A TypeScript Framework for AI Newsletters

https://github.com/kimhongyeon/llm-newsletter-kit-core
1•hongyeon•10m ago•0 comments

Kopi Luwak

https://en.wikipedia.org/wiki/Kopi_luwak
2•thunderbong•23m ago•0 comments

Tom Stoppard, Award-Winning Playwright of Witty Drama, Dies at 88

https://www.nytimes.com/2025/11/29/theater/tom-stoppard-dead.html
2•mitchbob•26m ago•1 comments

The Markets Aggregating Political Reality

https://freesystems.substack.com/p/inside-the-markets-aggregating-political
1•gwintrob•30m ago•0 comments

Adolescence lasts into 30s – new study shows four pivotal ages for your brain

https://www.bbc.co.uk/news/articles/cgl6klez226o
1•ifh-hn•32m ago•1 comments

Show HN: I built a Web 1.0 budgeting tool, Budget Pro 3000

https://budgetpro3000.com
1•adrianvxyz•35m ago•0 comments

Do we need a new GitHub for AI coding era?

https://github.com/memovai/memov
1•ssslvky1•37m ago•2 comments

Welcome to My Andrew Lloyd Website

https://andrewlloydwebsite.neocities.org/
1•nxobject•38m ago•0 comments

Steven Pinker's Cheesecake for the Mind (1998)

http://cogweb.ucla.edu/Abstracts/Carroll_C98.html
2•lioeters•46m ago•1 comments

Show HN: iOS Old App Downloader 2 [video]

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

NFCGate flagged as malware even after multiple followups saying it isn't

https://github.com/nfcgate/nfcgate/issues/164
2•Antitoxic6185•50m ago•0 comments

Coupang says 33.7M customer accounts breached

https://www.reuters.com/sustainability/boards-policy-regulation/south-korean-e-commerce-firm-coup...
1•alephnerd•57m ago•0 comments

Cybertruck Drives 1,200 Miles FSD 14.2 Autonomously

https://gearmusk.com/2025/11/30/cybertruck-drives-1200-miles-fsd/
3•loog5566•1h ago•0 comments

LLM live ranking (Gemini, OpenAI, xAI)

https://metrik-dashboard.vercel.app/
1•mbouassa•1h ago•0 comments

Human See, Human Do

https://www.edwest.co.uk/p/human-see-human-do
1•Ariarule•1h ago•0 comments

What Are Microservices? (Seriously)

https://bykozy.me/blog/what-are-microservices-seriously/
1•byko3y•1h ago•0 comments

Aircraft Boneyard

https://en.wikipedia.org/wiki/Aircraft_boneyard
3•thunderbong•1h ago•0 comments

YouTube increases FreeBASIC performance (2019)

https://freebasic.net/forum/viewtopic.php?t=27927
3•giancarlostoro•1h ago•0 comments

Hierarchy of Engineering Talent

https://www.businessinsider.com/andrew-ng-talent-engineer-ai-hire-college-graduates-computer-scie...
1•MarcoDewey•1h ago•0 comments

What DFH / the Semantic Stack Does

https://github.com/colts70/The-Sematic-Stack
1•sematicstackdfh•1h ago•1 comments

A personal email newsletter is great

https://bryanhogan.com/blog/email-thank-you
3•bryanhogan•1h ago•0 comments

The Perpetual Student

https://domofutu.substack.com/p/the-perpetual-student
2•wjb3•1h ago•0 comments

Show HN: Ai2.compare Gists with a twist, compare AIs, save, share, explore chats

https://ai2.compare/gist/3f5b3197-bac2-4edb-838c-7535c8b85a10
1•ozgurozkan•1h ago•0 comments

Land, Debt, and Crises

https://arnoldkling.substack.com/p/land-debt-and-crises
2•Ariarule•1h ago•0 comments

Black Friday sets online spending record of $11.8B

https://techcrunch.com/2025/11/29/black-friday-sets-online-spending-record-of-11-8b-adobe-says/
5•MarcoDewey•1h ago•0 comments

Shopify lays off staff to keep team 'fast, sharp and focused'

https://ca.finance.yahoo.com/news/shopify-lays-off-staff-keep-211040075.html
9•mgh2•1h ago•3 comments

Zigbook Is Plagiarizing the Zigtools Playground

https://zigtools.org/blog/zigbook-plagiarizing-playground/
17•todsacerdoti•1h ago•2 comments

Minimal information needed to disambiguate rows

https://github.com/gojiplus/rowvoi
1•neehao•1h ago•0 comments