frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Iran's Supreme Leader Ali Khamenei Was Killed and His Body Found

https://www.haaretz.com/israel-news/2026-02-28/ty-article-live/trump-not-happy-with-iran-nuclear-...
3•trakkstar•1m ago•0 comments

Show HN: VibeHQ Orchestrate multiple CLI agents as a real company team

https://github.com/0x0funky/vibehq-hub
2•0xfunky•3m ago•0 comments

Show HN: InterviewTrackr – All-in-one command center for CS job hunts

https://interviewtrackr.com/
1•princierKevin•3m ago•0 comments

Show HN: Chatlite – simple Ollama desktop chat app under 5 MB

https://github.com/that-one-arab/Chatlite
1•mo-dulaimi•3m ago•0 comments

Vector and Semantic Search in Stoolap

https://stoolap.io/blog/2026/02/27/vector-and-semantic-search-in-sql/
1•murat3ok•4m ago•0 comments

Khamenei Dead

https://twitter.com/BarakRavid/status/2027830773328302396
4•harscoat•4m ago•0 comments

Trump Deliberated on Iran for Weeks

https://www.cnn.com/2026/02/28/politics/trump-iran-strikes-decision
1•Bender•7m ago•1 comments

Show HN: Open-Plan-Annotator – Annotate Agent Plans Like a Google Doc 100% Local

https://github.com/ndom91/open-plan-annotator
1•ndom91•7m ago•0 comments

The Birth of Light

https://nautil.us/the-birth-of-light-1270615/
1•Bender•8m ago•0 comments

Show HN: A Rust compiler with ownership checking, written in PHP

https://github.com/mrconter1/rustc-php
1•mrconter11•11m ago•0 comments

Google quantum-proofs HTTPS by squeezing 15kB of data into 700-byte space

https://arstechnica.com/security/2026/02/google-is-using-clever-math-to-quantum-proof-https-certi...
1•Bender•11m ago•0 comments

Show HN: Nett – See what you can spend (not your bank balance)

https://nett.fyi
1•Clutchone2•12m ago•0 comments

Show HN: CranKen – A Math Puzzle Game for the Play.date

https://geistpro.itch.io/cranken
1•kgarten•13m ago•0 comments

The Making of Anthropic CEO Dario Amodei (2025)

https://kantrowitz.medium.com/the-making-of-anthropic-ceo-dario-amodei-449777529dd6
1•Kye•16m ago•0 comments

An Efficient Ralph Wiggum Loop on Raspberry Pi Powered by Mfbt [video]

https://www.youtube.com/watch?v=dz4hiw5Qvz0
1•dennisjoseph•16m ago•0 comments

Signs show that Khamenei is 'no longer with us', says Netanyahu

https://www.theguardian.com/world/live/2026/feb/28/israel-attacks-iran-as-blasts-heard-in-tehran-...
1•mitchbob•17m ago•3 comments

Be Careful with LLM Agents

https://maurycyz.com/misc/sandbox_llms/
1•maurycyz•18m ago•0 comments

Mquire: Linux memory forensics without external dependencies

https://blog.trailofbits.com/2026/02/25/mquire-linux-memory-forensics-without-external-dependencies/
2•nobody9999•19m ago•1 comments

Thinking Deeply About Theming and Color Naming

https://css-tricks.com/thinking-deeply-about-theming-and-color-naming/
1•todsacerdoti•20m ago•0 comments

Show HN: Didacu – The fastest way to learn something new

https://didacu.com
2•datadiego•20m ago•0 comments

UK reaches 90% Gigabit broadband coverage as full fibre rollouts continue

https://www.thinkbroadband.com/news/uk-reaches-90-gigabit-broadband-coverage-as-full-fibre-rollou...
1•ksec•24m ago•0 comments

Show HN: Get GPT-5.2, Grok-4.1-fast, KimiK2.5 and more LLMs at half the cost

https://frogapi.app
1•vnhc•26m ago•0 comments

Show HN: StatusLane – Minimal status pages and uptime for small SaaS

https://statuslane.dev
1•wharleyornelas•27m ago•0 comments

Bytewords – encoding bytes as one of 256 four-letter English words

https://developer.blockchaincommons.com/bytewords/
1•alcazar•27m ago•1 comments

Show HN: We ran a sycophancy experiment on Claude and built a music publication

1•structureonly•27m ago•0 comments

Apple 'accidentally' enabled Age Verification in the UK

https://old.reddit.com/r/ios/comments/1rgi5c0/apple_accidentally_enabled_age_verification_in/
1•_____k•28m ago•0 comments

Bypassing Noexec with Memfd_create(2)

https://gavinray97.github.io/blog/memfd-create-noexec
2•gavinray•28m ago•0 comments

Starts Club – YC-style startup idea validator

1•androbuddy•30m ago•0 comments

Elite Doctors Served Jeffrey Epstein While Treating His 'Girls'

https://www.nytimes.com/2026/02/28/us/jeffrey-epstein-doctors.html
3•Anon84•31m ago•0 comments

Siteshamer – Get brutally honest feedback on any website

https://siteshamer.com
1•pinin•32m ago•0 comments