frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Apple Ramps Up MacBook Neo Production to 10M Units Amid Strong Demand

https://www.techpowerup.com/348188/apple-ramps-up-macbook-neo-production-to-10-million-units-amid...
1•speckx•40s ago•0 comments

Palantir Stock Continues to Fall. Not Even the President Can Erase the Losses

https://www.barrons.com/articles/palantir-stock-price-president-trump-anthropic-7313031c
3•1vuio0pswjnm7•4m ago•0 comments

Show HN: Access X, Reddit, Threads and all social media data from a single API

https://www.socialcrawl.dev/
1•magneticbrains•4m ago•1 comments

A Picture is Worth a Thousand Tokens

https://repaint.com/blog/picture-is-worth-a-thousand-tokens
2•benshumaker•4m ago•0 comments

Dual national Londoner stranded in Spain by new border rule

https://www.bbc.com/news/articles/c747vj1z0xwo
1•speckx•4m ago•0 comments

Problems Before the Real Problem: The First Lessons of Apollo 13

https://www.flyingbarron.com/2026/04/problems-before-real-problem-first.html
2•flyingbarron•5m ago•0 comments

Apple Reportedly Testing AI Glasses in Several Frame Styles

https://www.cnet.com/news/apple-reportedly-testing-ai-glasses-in-several-frame-styles/
1•CharlesW•7m ago•0 comments

How to Stop Cops from Using Wi-Fi to "See Through the Walls" of Your Home [video]

https://www.youtube.com/watch?v=LngDW3t36nc
1•dp-hackernews•7m ago•0 comments

Show HN: Curation: Share Podcast Recommendation

https://curation-509629088134.us-west1.run.app/
1•arbol•8m ago•0 comments

OpenAI's latest internal memo about beating the competition

https://www.theverge.com/ai-artificial-intelligence/911118/openai-memo-cro-ai-competition-anthropic
1•pretext•10m ago•0 comments

Mount GitHub repositories as a virtual read-only macOS filesystem

https://github.com/indragiek/GHFS
1•latchkey•11m ago•0 comments

I Rode in a Waymo with a Litigator: Here's What I Learned

https://www.law.com/2026/04/13/i-rode-in-a-waymo-with-a-litigator-heres-what-i-learned/
2•1vuio0pswjnm7•14m ago•0 comments

Show HN: Is Claude still thinking? How are you wasting life?

https://claudestillthinking.com
2•Exorust•14m ago•1 comments

Show HN: Hitoku Draft – context aware local macOS assistant

https://github.com/Saladino93/hitokudraft
1•lostathome•14m ago•0 comments

Running (and Coding with) Local AI on a Mac

https://github.com/dmitryryabkov/local-ai-mac
2•allessa•14m ago•0 comments

Linux 7.0 debuts as Linus Torvalds ponders AI's bug-finding powers

https://www.theregister.com/2026/04/13/linux_kernel_7_releaseed/
2•blackcoffeerain•14m ago•0 comments

New disclosures reveal how DOGE worked

https://www.washingtonpost.com/politics/2026/04/13/doge-musk-trump-deposition-videos-chatgpt/
1•_tk_•14m ago•0 comments

Want to understand the current state of AI? Check out these charts

https://www.technologyreview.com/2026/04/13/1135675/want-to-understand-the-current-state-of-ai-ch...
1•joozio•15m ago•0 comments

Why most AI projects feel useless

2•vaishcodescape•17m ago•1 comments

Lobsters Interview with Internet_Jannitor

https://alexalejandre.com/programming/interview-with-john-earnest/
1•PaulHoule•17m ago•0 comments

Show HN: Asthi – Damn good asset tracker

https://www.asthi.app/
1•suvamsh•19m ago•0 comments

Show HN: CRXcavator, but Better

https://amibeingpwned.com
1•acorn221•19m ago•0 comments

I vibe coded a feed reading web app. It was enlightening and uncomfortable

https://www.theregister.com/2026/04/12/vibe_coding_works/
3•geekinchief•20m ago•0 comments

Show HN: Built a personality that lives across CLI, browser, and web –> all solo

1•thomasgeelens•22m ago•0 comments

Show HN: Aurora – a browser engine experiment in Rust

1•JohannaAlmeida•23m ago•1 comments

What does it mean to measure durable change velocity in 2026?

https://www.gitclear.com/blog/measuring_durable_change_velocity_in_2026_prompt_to_production_era
1•wbharding•23m ago•0 comments

The AI build-out is powering global goods trade

https://www.ft.com/content/ad169119-4a62-437b-b6ec-70819b1e8b4f
1•alephnerd•24m ago•0 comments

Mist: Open-source Markdown editor with AI-native comments and suggested edits

https://interconnected.org/home/2026/04/10/open-mist
1•austinbirch•25m ago•0 comments

Cloudflare Turnstile Is Down

2•owenthejumper•25m ago•0 comments

Unpatched vuln in RAGFlow allows for post-auth RCE

https://zeropath.com/blog/ragflow-rce-unpatched-vulnerability
1•NonStopOyster•26m ago•0 comments