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

"allow read: if true" is two permissions, and a field mask isn't one

https://redsuture.com/research/firestore-get-vs-list
1•MikeDMuindi•2m ago•0 comments

Show HN: We turned our marketing site into a flight simulator

https://okae.ai/landing
2•okae-team•3m ago•0 comments

The first beta of Android 18

https://developer.android.com/blog/posts/the-first-beta-of-android-18
1•exploraz•3m ago•0 comments

An agent governance framework for enterprises

https://luciobaiocchi.com/blog/agent-governance-security-framework
2•luciobaiocchi•5m ago•0 comments

Forge Engine – Visual 2D Game Maker Editor

https://forgeengine.space/
1•Benjaminqwer•7m ago•1 comments

Out of the Muck

https://bengodfrey.dev/blog/out-of-the-muck/
1•sudo-bendg•8m ago•0 comments

Adversarial Hiring

https://drive.google.com/file/d/1_u30ecKI2NnLjyE7fbSLbcpKF-njASfb/view
1•rustoo•8m ago•0 comments

Zig: Package conflict management and build system docs

https://ziglang.org/devlog/2026/#2026-12-04
1•joshcsimmons•10m ago•0 comments

V Programming Language 0.5.3

https://github.com/vlang/v/releases/tag/0.5.3
1•hggh•11m ago•0 comments

Post-quantum RSA (terabyte key) (2017)

https://eprint.iacr.org/2017/351
1•networked•11m ago•0 comments

The Hidden Cost of Getting Everything Right

https://www.derekthompson.org/p/what-happens-when-we-build-a-machine
1•thunderbong•12m ago•0 comments

Ente was built by ex Google engineer in response to project maven

https://twitter.com/Felix_Josemon/status/2129063217456628176
2•tachyons•14m ago•0 comments

Keep AI under human control or risk extinction, Anthropic investor warns

https://www.bbc.com/news/articles/c6wy48yv4xw7o
2•jo_in_europe•15m ago•0 comments

Quantum, AI, and Your Keys: You Don't Have to Do Anything

https://gno.land/r/nym-nobody777/blog:p/quantum-ai-keys
1•jaekwon•17m ago•0 comments

Why Nvidia just teamed up with a chip rival [video]

https://www.youtube.com/watch?v=ZQBsvs9_mds
1•saikatsg•18m ago•0 comments

Pushin becomes first Git forge to support post-quantum Git over SSH

https://pushin.eu/blog/2026-12-04-post-quantum-ssh
1•pjullrich•19m ago•0 comments

Against AI-Shaming

https://nitter.click/i/article/2117700723345338412?__aragorn=O9bevrmaXdo_p2biTQFm26p0tWcQCLyvfgX8...
2•Tomte•26m ago•0 comments

State of SSL and TLS Encryption in Late 2026

https://zerossl.com/p/ssl-in-late-2026
1•taubek•30m ago•0 comments

EKA-1 Technical Report [pdf]

https://soket.ai/reports/eka-1-technical-report.pdf
1•porridgeraisin•36m ago•0 comments

What kind of facilities does the Internet Archive have and how is it operated?

https://gigazine.net/gsc_news/en/20260119-web-inside-internet-archives/
3•FrankyHollywood•38m ago•1 comments

I closed one third of all Plasma bugs

https://thelibre.news/how-i-closed-one-third-of-all-plasma-bugs/
2•Gander5739•45m ago•0 comments

Anssi: Recent AI Advances and Their Impact on Cryptography [in French]

https://cyber.gouv.fr/actualites/avis-de-lanssi-sur-avancees-permises-par-lia-et-leur-impact-sur-...
1•otrack•48m ago•0 comments

New Legal Authority for Authorities to Intercept 2FA Messages to Access Accounts

https://decoded.legal/blog/2026/12/a-new-lawful-authority-for-the-interception-of-two-factor-auth...
2•DeepLogin•54m ago•1 comments

Ask HN: You're the most tech savvy US President ever. What's your AI policy?

1•noduerme•54m ago•1 comments

Microbiome home tests are taking off. Can they be trusted?

https://www.nature.com/articles/d41586-026-03710-y
1•mfld•58m ago•0 comments

Nvidia finds 'material weaknesses' in controls over financial reporting

https://www.ft.com/content/5b6c122b-1b13-4d06-8f4e-b43705b68803
5•uxhacker•1h ago•1 comments

Pipedream confirms compromised API keys and is temporarily unavailable

https://pipedream.com/
5•aghuang•1h ago•0 comments

Rust, Post-Quantum Cryptography, and You

https://rustfoundation.org/media/rust-post-quantum-cryptography-and-you/
4•espeed•1h ago•0 comments

5-Yr-Old Can't Sleep as Microsoft's AI Data Center Runs 24/7: Microsoft Lawsuit

https://www.ibtimes.sg/5-year-old-cant-sleep-microsofts-ai-data-center-runs-24-7-families-sue-ove...
5•Skywalker19•1h ago•0 comments

US banks are sharing Social Security numbers with ad giants Reddit and X

https://techcrunch.com/2026/12/03/us-banks-are-sharing-social-security-numbers-with-advertising-g...
3•nreece•1h ago•0 comments