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

Urn in Aadhaar: Meaning, Benefits, Process and Key Details – SMFG India Credit

https://www.smfgindiacredit.com/knowledge-center/what-is-urn-in-aadhar.aspx
1•saumyaraut11•32s ago•0 comments

How to Achieve Pruning When Querying by Non-Partitioned Columns in PostgreSQL

https://hakibenita.com/postgresql-partition-pruning
1•theanonymousone•35s ago•0 comments

Neural mechanisms of credit assignment for inferred relationships (2022)

https://www.cell.com/neuron/fulltext/S0896-6273(22)00462-7
1•ike_usawa•1m ago•0 comments

I added Souls-like comments to my blog

https://davidguerrero.fr/blog/souls-like-comments/
1•davguerrero•1m ago•0 comments

Show HN: An app that turns skipped coffees into an honest investment projection

https://worthithabits.com/
1•nat_startup•2m ago•0 comments

Show HN: I Built a Player to Turn Any Video into Real-Time ASCII Art

https://techoreon.github.io/verpad/asclii.html
1•guptalog•3m ago•0 comments

Mythos 5 offered outside the US by Anthropic

https://news.sky.com/video/mythos-5-offered-outside-the-us-by-anthropic-13561860
1•austinallegro•3m ago•0 comments

Show HN: I reverse-engineered LinkedIn's SDUI update that broke auto-apply

https://jobeasyapply.com
1•Maazkhanxo•3m ago•0 comments

Is it ethical to use AI?

https://charity.wtf/p/make-ai-boring-again
1•mooreds•3m ago•0 comments

Viability of Local Models for Coding

https://martinfowler.com/articles/exploring-gen-ai/local-models-for-coding-factors.html
1•mooreds•5m ago•0 comments

Show HN: QX Labs – build agents, flows and grids that work across your tools

https://www.qxlabs.com
1•hackfather•5m ago•1 comments

Briar Is in Maintenance Mode

https://briarproject.org/news/2026-maintenance-mode/
1•Vinnl•6m ago•0 comments

A chapter a day: Association of book reading with longevity

https://www.sciencedirect.com/science/article/abs/pii/S0277953616303689?_bhlid=bbc1a3e1d5a98a2322...
1•RickJWagner•6m ago•0 comments

Codex Responses regression: reasoning summaries now return <!-- --> bodies

1•_bobm•8m ago•0 comments

Show HN: WhisperShortcut – voice layer for AI on macOS (BYOK, offline Whisper)

https://github.com/mgsgde/whisper-shortcut
1•mgsgde•8m ago•0 comments

Bypassing the hyperscaler AI PaaS tax with a Rust orchestration plane

https://github.com/ss-forge/public-shares
1•csomaratne•9m ago•0 comments

Ask HN: I hate coding agents. Is this skill issue?

1•cmar00•10m ago•0 comments

Show HN: I built a video editor that edits itself

https://www.kadrix.io/
1•fognitix•11m ago•0 comments

Meta to build C$13B Alberta data center, its first in Canada

https://www.reuters.com/world/americas/meta-build-c13-billion-alberta-data-center-its-first-canad...
2•adithyaharish•12m ago•0 comments

LLM-as-a-Verifier: A General-Purpose Verification Framework

https://arxiv.org/abs/2607.05391
1•Anon84•13m ago•0 comments

Show HN: Paralino – E2E encrypted and private Life360 alternative

https://github.com/paralino/paralino
2•Zelimir_Bosnjak•14m ago•0 comments

Meta Is Toying with the Idea of Smart Glasses That Record All the Time

https://gizmodo.com/meta-is-toying-with-the-idea-of-smart-glasses-that-record-everything-all-the-...
1•alex_suzuki•16m ago•1 comments

V2 of Holographic Horizon Shield: LLM Defenses with Phi-3 Integration

https://github.com/jadeavsmith-tech/holographic-horizon-shield-v2
1•solutionsgirl39•16m ago•0 comments

LLama.cpp Got Screwd

https://github.com/ggml-org/llama.cpp/discussions/25482
2•trilogic•17m ago•2 comments

Will-O'-the-Wisp

https://en.wikipedia.org/wiki/Will-o%27-the-wisp
1•articlepan•21m ago•0 comments

A Fable – The Flatland of AI Alignment

https://github.com/thansz137/asiyah-protocol/blob/main/dibur/2026-07-08_dibur.md
1•thansz•22m ago•1 comments

AI Replaced Bankers on a Private Equity Sale Process

https://www.wsj.com/pro/private-equity/ai-replaced-bankers-on-a-cvc-sale-process-ce9b765b
1•antr•23m ago•0 comments

Show HN: Ember – Lightweight headless browser for AI agents (17MB idle)

https://github.com/andalabx/ember
1•Andassyn•25m ago•1 comments

Astryx by Facebook: An design system that's customizable and agent ready

https://github.com/facebook/astryx
1•maxloh•25m ago•0 comments

2026 Gaokao Q19 – Too hard for high school math?

https://www.youtube.com/watch?v=M2osaylNmsU
1•mathsTeacher82•27m ago•0 comments