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

Faster command recall with substring search

https://www.dantleech.com/blog/2026/10/15/faster-command-recall-with-substring-search./
1•speckx•51s ago•0 comments

Libreboot 26.10 "Ominous Olive" released with full UEFI support

https://libreboot.org/news/libreboot2610.html
1•iamnothere•1m ago•0 comments

Religious Studies in Software Engineering

https://tombh.co.uk/religious-studies-in-software-engineering
1•tombh•4m ago•0 comments

Why Every Microwave Has a Popcorn Button, but Every Bag Warns You Not to Use It

https://hackaday.com/2026/10/10/why-every-microwave-has-a-popcorn-button-but-every-bag-warns-you-...
1•speckx•4m ago•0 comments

Show HN: Wordwonk – a new wordgame mechanic everyday

https://wonkle.org/wordwonk/
1•3mar2•6m ago•0 comments

X purges 13,000 accounts linked to suspected meddling ahead of US midterms

https://www.theregister.com/security/2026/10/15/x-purges-13000-accounts-linked-to-suspected-meddl...
6•ilreb•7m ago•0 comments

Play Call of Duty Black Ops Zombie Mode, in the Browser

https://vel.gg/bo1z
1•Kovah•11m ago•0 comments

Turn your regular JavaScript code into a neural net

https://chenglou.me/handwired/
1•2a0c40•12m ago•0 comments

VC performance index from public records: 50 firms, 29k companies, API

https://meritcapit.al,
2•erik-list•13m ago•0 comments

I do not use LLMs more

https://marginalrevolution.com/marginalrevolution/2026/10/why-i-do-not-use-llms-more.html
1•speckx•13m ago•0 comments

Modal Logic and Topology

https://www.johndcook.com/blog/2026/10/04/modal-topology/
1•surprisetalk•13m ago•0 comments

The Dead Salmons of AI Interpretability

https://arxiv.org/abs/2512.18792
1•Luc•14m ago•0 comments

The Siren Call of Silicon Leviathan

https://arxiv.org/abs/2609.28591
1•gone35•15m ago•0 comments

Cookie Monster Tries to Meet His A.I. Mandate

https://www.newyorker.com/magazine/2026/10/05/cookie-monster-tries-to-meet-his-ai-mandate
1•apesti•15m ago•0 comments

Ukraine strikes fourth Russian data center Sberbank's Balakovo in Saratov region

https://www.reuters.com/business/finance/ukrainian-drones-hit-russias-biggest-data-centre-2026-10...
3•ck2•17m ago•4 comments

Over the last two weeks, we cut –$100k a year from Gumroad's AWS bill

https://twitter.com/ershus/status/2108574988404216271
2•tosh•17m ago•0 comments

Blink-powered glasses could keep an eye on health

https://news.northwestern.edu/stories/2026/10/blink-powered-glasses-could-keep-an-eye-on-health
1•geox•18m ago•0 comments

Article: Writing Code versus Shipping Code

https://cepr.org/voxeu/columns/writing-code-versus-shipping-code-productivity-effects-across-gene...
1•mellosty•20m ago•0 comments

Show HN: Ferry – RSS reader that ranks stories by how many outlets cover them

https://apps.apple.com/us/app/ferry-news-rss-reader/id6799505775
1•apoorvprecisely•22m ago•0 comments

Show HN: deCDN – a peer-to-peer CDN where every piece is BLAKE3-verified

https://github.com/decdn/decdn
4•agun•22m ago•1 comments

Show HN: Face, a browser window over agents that keeps the plan in files

https://face.kodel.com.br
1•JCKodel•24m ago•0 comments

Spindizzy Remake in the Browser

https://spindizzy.adventure.io/
1•liszper•25m ago•0 comments

Show HN: SafeSwapGlobal – A zero-tracking static crypto swap directory

https://safeswapglobal.online/
1•SafeSwapGlobal•26m ago•0 comments

RIAA Flags Anna's Archive and AI Voice Cloner to U.S. Government

https://torrentfreak.com/riaa-flags-annas-archive-and-ai-voice-cloner-to-u-s-government/
1•iamnothere•26m ago•0 comments

gea3D – Three.js-style native software 3D renderer for tiny devices

https://github.com/geastack/gea3d
2•arbayi•27m ago•0 comments

How to avoid sanewashing Trump (and other politicians)

https://www.poynter.org/ethics-trust/2024/sanewashing-meaning-donald-trump-journalists/
2•bthallplz•28m ago•1 comments

Show HN: Multi persona library to eradicate Spec Hallucination

https://github.com/sidgitind/Sparring
1•sidj1981•28m ago•0 comments

Oomwoo: Own Open-Source Robot Vacuum

https://www.ikkaro.net/oomwoo-open-source-robot-vacuum/
2•Gedxx•28m ago•0 comments

Show HN: UberDeviceLog – Unified native and WebView logging for iOS and Android

https://uber-device-log.app/
1•fabricci•29m ago•0 comments

Def∇: An APL-Style Self Reference Macro for Lean4

https://jamesoswald.dev/posts/defdel/
1•ibobev•31m ago•0 comments