frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Show HN: Apps by AI (Claude Opus 4.5)

https://lawrencehook.github.io/apps-by-ai/
1•lawrencehook•9m ago•0 comments

Retreating from EVs could be hazardous for Western carmakers

https://www.economist.com/business/2025/12/17/retreating-from-evs-could-be-hazardous-for-western-...
1•smurda•9m ago•0 comments

Mysterious quantum computing restrictions spread across multiple nations (2024)

https://www.tomshardware.com/tech-industry/quantum-computing/mysterious-quantum-computing-restric...
3•kome•10m ago•0 comments

An experiment in separating identity, memory, and tools

https://RCRDBL.com
2•promptfluid•12m ago•1 comments

Show HN: DStream (bespoke music player for web) non-web clients

https://github.com/DusteDdk/dstream-clients
1•dusted•13m ago•0 comments

Large Causal Models from Large Language Models

https://arxiv.org/abs/2512.07796
1•Anon84•14m ago•0 comments

We may never be able to tell if AI becomes conscious

https://techxplore.com/news/2025-12-ai-conscious-philosopher.html
1•gmays•14m ago•0 comments

Loki Mode

https://github.com/asklokesh/claudeskill-loki-mode
1•handfuloflight•16m ago•0 comments

Human Processor Model

https://en.wikipedia.org/wiki/Human_processor_model
2•Sir_Twist•16m ago•1 comments

Betty Reid Soskin, who became a park ranger at 85, dies aged 104

https://www.theguardian.com/us-news/2025/dec/22/betty-reid-soskin-death-national-park-service
2•herbertl•17m ago•0 comments

Why is it easier to whistle in tune than to sing in tune?(2018)

https://pmc.ncbi.nlm.nih.gov/articles/PMC5936900/
1•BiraIgnacio•26m ago•1 comments

How to Use the Linux Uniq Command (With Examples) [video]

https://www.youtube.com/watch?v=2b8jwRomkWM
3•billybuckwheat•32m ago•0 comments

James Moylan, Engineer That Designed Gas Tank Arrow Indicator, Has Died

https://fordauthority.com/2025/12/ford-engineer-that-designed-gas-tank-indicator-passes-away/
2•NaOH•32m ago•1 comments

Show HN: GitHub Activity Analytics Powered by ClickHouse

https://velocity.clickhouse.com/#org=ClickHouse&metric=all_activity&range=all&grouping=auto&alexe...
1•saisrirampur•34m ago•0 comments

Atomic Orbital Viewer

https://asliceofcuriosity.fr/assets/atom/orbitalsApp-Metropolis.html
2•derbOac•34m ago•0 comments

Postgres for everything, does it work?

2•saisrirampur•37m ago•0 comments

QNX Self-Hosted Developer Desktop

https://devblog.qnx.com/qnx-self-hosted-developer-desktop-initial-release/
1•transpute•38m ago•1 comments

Can a Transformer "Learn" Economic Relationships?

https://aleximas.substack.com/p/can-a-transformer-learn-economic
1•gmays•40m ago•0 comments

Blinc: Declarative and reactive GUI based on Rust

https://github.com/project-blinc/Blinc
2•cxplay•42m ago•0 comments

The battle to stop clever people betting

https://www.economist.com/christmas-specials/2025/12/18/the-battle-to-stop-clever-people-betting
2•zoenolan•44m ago•1 comments

Two centuries ago, Russian revolutionaries tried to change the world

https://www.economist.com/christmas-specials/2025/12/18/two-centuries-ago-russian-revolutionaries...
2•Anon84•45m ago•0 comments

Entropy Is the Real Engagement Metric

https://medium.com/@stephengettel/entropy-is-the-real-engagement-metric-f7dc223931cc
1•SpicyG•55m ago•0 comments

Graph Retrieval-Augmented Generation: A Survey

https://dl.acm.org/doi/10.1145/3777378
1•Anon84•57m ago•0 comments

Postgres and ClickHouse forming the default data stack for AI

https://thenewstack.io/postgres-clickhouse-the-oss-stack-to-handle-agentic-ai-scale/
1•saisrirampur•58m ago•0 comments

Jevons Paradox for Knowledge Work

https://twitter.com/levie/status/2004654686629163154
1•gmays•58m ago•0 comments

The Emoji Layer

https://poggers.institute/@j/the-emoji-layer/
1•jrecyclebin•1h ago•0 comments

SneefAI – AI workspace for articles, docs and videos

https://sneefai.com/
1•alexkarani•1h ago•1 comments

The Death of the Draftsman

https://tecnetinc.com/The%20Death%20of%20the%20Draftsman.html
1•auxym•1h ago•0 comments

Publishing your work increases your luck

https://github.com/readme/guides/publishing-your-work
3•magoghm•1h ago•0 comments

Three-quarters of the global population are not getting enough Omega-3

https://www.southampton.ac.uk/news/2025/12/three-quarters-not-meeting-recommended-omega3-intakes....
4•geox•1h ago•0 comments