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

Beginner's guide to the Amiga E language

https://blog.mikaellundin.name/2016/02/18/beginners-guide-to-amiga-e.html
2•harel•1m ago•0 comments

China's Initiative to Regulate Anthropomorphic AI

https://www.kwm.com/cn/en/insights/latest-thinking/chinas-Initiative-to-regulate-anthropomorphic-...
2•shinryuu•1m ago•0 comments

US Supreme Court's Republicans seized most dangerous power in constitutional law

https://www.vox.com/politics/481401/supreme-court-mirabelli-bonta-sauron-wins
1•robtherobber•2m ago•0 comments

Show HN: MeshCore SAR – Voice, Maps, and Messaging Without Cell Coverage

https://github.com/dz0ny/meshcore-sar
1•dz0ny•3m ago•0 comments

Show HN: Skill for structured deep research with Claude Code and Obsidian

https://github.com/alvdef/obsidian-deep-research
1•alvdef•3m ago•1 comments

First Known Mass iOS Attack

https://iverify.io/press-releases/first-known-mass-ios-attack
1•louismerlin•3m ago•0 comments

EU proposes "Made in EU" rules for strategic sectors to limit China reliance

https://www.reuters.com/world/china/eu-lay-out-local-content-rules-strengthen-manufacturing-cut-c...
1•alephnerd•4m ago•0 comments

Amiga C Tutorial

http://www.pjhutchison.org/tutorial/amiga_c.html
1•harel•4m ago•0 comments

Running Llama Inference on Intel Itanium

https://medium.com/@tglozar/running-llama-inference-on-intel-itanium-part-2-045d663fe5d4
1•RobotToaster•4m ago•0 comments

Mdenc – Diff-friendly Markdown encryption for Git

https://github.com/yogh-io/mdenc
1•yoghurt114•4m ago•1 comments

How to protect your privacy at a protest

https://proton.me/blog/how-to-protect-privacy-at-protests
2•Vinnl•4m ago•0 comments

Extensible macOS system telemetry generator

https://github.com/0xv1n/macnoise
1•Bengalilol•9m ago•0 comments

State of marketplaces: ChatGPT output directly used in tiles and descriptions

https://www.amazon.com/ADAOQIN-That-Heres-Revised-Title/dp/B0DQKYK19Q
1•stefanvdw1•9m ago•1 comments

Iran war wreaking havoc on shipping and air cargo, could create global delays

https://www.theregister.com/2026/03/02/iran_war_tech_supply_chain/
4•Bender•9m ago•0 comments

Show HN: See the blast radius of every code change in VS Code

https://marketplace.visualstudio.com/items?itemName=CodeLayers.codelayers
1•lnguyen11288•10m ago•0 comments

I built Visual Contextual Chat: AI that builds a structured profile as you talk

https://99helpers.com/tools/visual-contextual-chat
1•nickk81•10m ago•1 comments

Beta Release: Predicated Recursive Descent for Rust

https://wareya.wordpress.com/2026/02/01/beta-release-predicated-recursive-descent-for-rust/
1•PaulHoule•11m ago•0 comments

AWS says drones hit two of its datacenters in UAE, urges users to move resources

https://www.theregister.com/2026/03/02/amazon_outages_middle_east/
2•Bender•12m ago•0 comments

HeliBoard is creating an open source gesture typing library

https://github.com/Helium314/HeliBoard/wiki/Tutorial:-How-to-Contribute-Gesture-Data
1•edent•12m ago•0 comments

The Illusion of Building

https://uphack.io/blog/post/the-illusion-of-building/
1•mariushh•14m ago•3 comments

Show HN: sombra – Your personal deep analysis system for understanding power

https://sombra.consulting/
1•hashino•15m ago•0 comments

Show HN: Evogine – Zero-dependency evolutionary optimization for Python

https://github.com/sku10/evogine
1•sku10•16m ago•0 comments

Quit ChatGPT: Your subscription is bankrolling authoritarianism

https://www.theguardian.com/commentisfree/2026/mar/04/quit-chatgpt-subscription-boycott-silicon-v...
4•jleyank•19m ago•1 comments

Show HN: Dustoff – CLI to find and remove JavaScript/TS build artifacts

https://github.com/westpoint-io/dustoff
1•max-roma•20m ago•1 comments

Qwen3.5 Fine-Tuning Guide – Unsloth Documentation

https://unsloth.ai/docs/models/qwen3.5/fine-tune
1•bilsbie•27m ago•0 comments

The JVG algorithm could break RSA-2048 encryption with fewer than 5k qubits

https://briefglance.com/articles/new-quantum-algorithm-warns-of-an-accelerated-crypto-apocalypse
2•giuliomagnifico•27m ago•0 comments

Searchable JSON compression tech asset offline demo and DD evidence and BYOD kit

https://flippa.com/12431275-pre-revenue-tech-asset-searchable-json-ndjson-compression-offline-10-...
1•Tetsuro•27m ago•1 comments

Iran fires missile at Turkey, a NATO member

https://www.reuters.com/world/middle-east/turkey-says-nato-defences-destroyed-missile-fired-iran-...
4•breppp•28m ago•2 comments

Evaluating Theory of Mind and Internal Beliefs in LLM-Based Multi-Agent Systems

https://arxiv.org/abs/2603.00142
1•Anon84•29m ago•0 comments

Slopful Things

https://kyefox.com/slopful-things/
2•todsacerdoti•30m ago•0 comments