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

Show HN: Blink – A high-performance Jev like decision model for C and WASM

1•marcobambini•2m ago•0 comments

Claudisms AI models overuse the same words. This is a running catalog of them

https://claudisms.ai/
1•Bluestein•2m ago•0 comments

'Turn the cameras off:' London's growing privacy pushback against smart glasses

https://www.cnn.com/2026/09/22/tech/london-privacy-pushback-meta-smart-glasses
2•thunderbong•3m ago•0 comments

The Personal Internet

https://yenecys.bearblog.dev/the-personal-internet/
1•Emerald_dreamer•3m ago•1 comments

Runtime Alignment with Synchronous Control Monitoring

https://max.ax/writing/synchronous-control-monitoring/
1•k5hp•4m ago•0 comments

Values, conditions, intent: People should declare them, not the model

https://github.com/Jang-woo-AnnaSoft/execution-state-preflight/blob/main/spec.en.md
1•offaxis•5m ago•0 comments

Show HN: Epure – Self-hosted exception tracker in 2 containers (Rust, Postgres)

https://github.com/epure-sh/epure
1•nonmaskable•6m ago•0 comments

How to Create a Crypto Token in 2026: Complete Step-by-Step Guide

https://www.promoteproject.com/article/228685/how-to-create-a-crypto-token-in-2026-complete-step-...
1•kodegridmarketi•11m ago•0 comments

I Maxed Out Fable 5 and Regretted It

https://thoughts.jock.pl/p/fable-5-efficiency-high-not-max-2026
2•joozio•11m ago•0 comments

Up to 100k in Taiwan spying for China: expert

https://www.taipeitimes.com/News/front/archives/2026/09/16/2003864338
2•harry_nutsachs•12m ago•0 comments

Show HN: ReacherX – Open-source Apollo alternative for founders and devs

https://www.reacherx.com/home
1•noobships•13m ago•0 comments

GPU is starving – LLM host dispatch at 191k steps/s on 1 vCPU

https://github.com/cortexLab011/floria-serving
1•cortexlab1•14m ago•0 comments

Apple Music Hall

https://www.apple.com/newsroom/2026/09/apple-opens-apple-music-hall-a-state-of-the-art-live-music...
3•soheilpro•14m ago•1 comments

Why the hard part of route optimization is the modeling, not the algorithm

https://kardinal.ai/why-the-hard-part-of-route-optimization-is-the-modeling-not-the-algorithm/
1•cedrichervet•15m ago•0 comments

I'm sick of Claudisms, and on AI-based software development

https://www.polso.info/im-sick-of-claudisms-future-ai-software-development
2•Risse•16m ago•0 comments

In Trump, Xi Sees 'Rare Window' to Convince Taiwan That Resistance Is Futile

https://www.wsj.com/world/china/trump-xi-taiwan-f236f228
1•Betelbuddy•17m ago•0 comments

JevBench, a reproducible benchmark for typed decision models

https://benchmarkheaven.com/jev-models
1•florianstandhar•17m ago•1 comments

British Columbia Sues OpenAI, Alleging ChatGPT Aided Mass School Shooting

https://www.wsj.com/tech/ai/british-columbia-sues-openai-alleging-chatgpt-aided-mass-school-shoot...
2•fortran77•17m ago•1 comments

Training a model to identify AI-generated web content from structure alone

https://arxiv.org/abs/2609.15369
2•jochenmadler•17m ago•1 comments

Show HN: ScopeTrail – audit receipts for multi-hop agent delegation

https://github.com/scopetrail/scopetrail
1•mrjimmy1•17m ago•0 comments

Coulomb's law remains tricky to test at home

https://chillphysicsenjoyer.substack.com/p/coulombs-law-remains-tricky-to-test
1•surprisetalk•18m ago•0 comments

Show HN: Gemma 3 4B as a typed decision function in Rust (47 ms/decision)

https://github.com/zozo123/gemma-to-jev
1•zozo123-IB-IL2•19m ago•0 comments

The American Prison Experiment: A History of Good Intentions and Bad Results

https://reason.com/2026/09/08/the-american-prison-experiment/
1•mooreds•19m ago•0 comments

Create digital product stores in minutes and start earning your first dollars

https://cloud.freshlimepay.com/?lang=en
2•jimmy_lee•20m ago•1 comments

PEP 823 – None-aware access operators

https://peps.python.org/pep-0823/
1•Ravencentric•20m ago•0 comments

ForgeMT: Multi-tenant platform for self-hosted GitHub Actions runners on AWS

https://github.com/cisco-open/forge
1•handfuloflight•21m ago•0 comments

Unfinished Work in Package Security

https://nesbitt.io/2026/09/22/unfinished-work-in-package-security.html
1•lumpa•21m ago•0 comments

Landing the Plane

https://theengineeringmanager.substack.com/p/landing-the-plane
1•mooreds•21m ago•0 comments

Package Manager Threat Model, Revisited

https://nesbitt.io/2026/09/22/package-manager-threat-model-revisited.html
1•lumpa•21m ago•0 comments

USWDS is dead. Long live USWDS

https://matthenry.fyi/posts/long-live-uswds/
1•mooreds•21m ago•0 comments