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 Once and Future Fable #5

https://thezvi.substack.com/p/the-once-and-future-fable-5
1•paulpauper•8m ago•0 comments

Chip Off the Old Block

https://www.astralcodexten.com/p/chip-off-the-old-block
1•paulpauper•8m ago•0 comments

2026 Unslop Contest Results

https://www.hyperstitionai.com/unslop-results
1•paulpauper•9m ago•0 comments

Fable open sourced NanoClaw's agent factory. It cost $800

https://twitter.com/Gavriel_Cohen/status/2072432348805669139
4•benocodes•10m ago•0 comments

What has FIRE been doing in the AI space?

https://expression.fire.org/p/what-has-fire-been-doing-in-the-ai
2•Volodzko•10m ago•0 comments

Warning to millions as toxic air lung-penetrating particles across 10 states

https://www.dailymail.com/sciencetech/article-15944679/toxic-air-pollution-new-york-california.html
1•Bender•12m ago•0 comments

Show HN: ExpenseSpy – AI receipt scanner that exports to Excel, built solo

https://expensespy.com
2•cdogukank•15m ago•0 comments

Show HN: Moxie – an open-source money agent that can't act without your consent

https://github.com/JacobBrooke1/moxie
1•JacobBrooke24•18m ago•0 comments

Glibc Introduces /etc/tunables.conf For System-Wide Tunables

https://www.phoronix.com/news/Glibc-System-Tunables
2•Bender•19m ago•1 comments

wgpu v30 has been Released!

https://github.com/gfx-rs/wgpu/releases/tag/v30.0.0
1•bloky•19m ago•0 comments

The Safari MCP server for web developers

https://webkit.org/blog/18136/introducing-the-safari-mcp-server-for-web-developers/
1•pascoej•20m ago•0 comments

Stop sign

https://en.wikipedia.org/wiki/Stop_sign
1•thecosas•20m ago•0 comments

Ask Hacker News: mute notifications while driving

1•alpple•20m ago•1 comments

Lake Powell Water Critically Low; Wyoming Expects More Demand On Flaming Gorge

https://cowboystatedaily.com/2026/07/01/as-lake-powell-nears-dead-pool-wyoming-cities-and-industr...
1•Bender•21m ago•0 comments

Japan has 41% of the 100-year companies – secrets of 1,447-year survival

https://www.j-times.org/en/media/articles/japan-shinise-1400-years-2026/
2•indynz•25m ago•0 comments

The Writers Who Wrote the Most in History

https://brennan.day/compulsion-the-writers-who-wrote-the-most-in-history/
2•bookofjoe•25m ago•0 comments

Measure Agent/Bot/Crawler visits on your website, Connect in 5 mins,Shopify

https://www.tryrankly.com/features/agent-analytics
1•rankly_admin•26m ago•1 comments

No one is using my vibe hosting:(

https://medium.com/@LadaHrbacek/no-one-is-using-my-vibe-hosting-ada3fe22462c
1•ladahrbacek•27m ago•1 comments

Email marketing reporting still takes 1–2 days a week for most teams

https://emailcalculator.com/auth/trial
1•emailcalculator•32m ago•1 comments

Groundbreaking Ceremony for India Development Centre (IDC) Campus in Noida

https://news.microsoft.com/en-in/groundbreaking-ceremony-for-india-development-centre-idc-campus-...
1•__natty__•33m ago•1 comments

Show HN: Zukr – offline OCR that flags hidden sugar names on food labels

https://zukr.app/
1•peshrus•33m ago•0 comments

Software Security Analysis in 2030 and Beyond: A Research Roadmap

https://dl.acm.org/doi/10.1145/3708533
2•matt_d•34m ago•0 comments

VeriCache: Turning Lossy KV Cache into Lossless LLM Inference

https://arxiv.org/abs/2605.17613
1•matt_d•35m ago•0 comments

I Left Harry's All-Night Hamburgers

https://escapepod.org/2013/09/14/ep413-why-i-left-harrys-all-night-hamburgers/
10•rbanffy•36m ago•2 comments

House Rules Committee blocks Massie-Khanna amendment to cut Israel aid

https://www.washingtonexaminer.com/policy/foreign-policy/4631610/massie-khanna-amendment-israel-aid/
4•lorecore•38m ago•1 comments

Letta Agent – Personalized Agent That Remembers and Learns

https://www.letta.com/agent/
1•DannyPage•39m ago•0 comments

Context on Context

https://davidmanheim.substack.com/p/context-on-context
1•cmeinel•40m ago•0 comments

Show HN: Intellisense style autocompletions inside of Bash

https://github.com/HalFrgrd/flyline
1•hazkoulia•40m ago•0 comments

Neural Render Proxies for Interactive and Differentiable Lighting

https://studios.disneyresearch.com/2026/07/01/neural-render-proxies-for-interactive-and-different...
1•tobr•41m ago•0 comments

Show HN: Phixo – explains why an email in Gmail/Outlook is phishing

https://chromewebstore.google.com/detail/phixo-—-ai-phishing-prote/diakennfllmgdpepgghjjcompjcp...
1•tech_builds•41m ago•0 comments