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: CallFirst – blocks socials until you've made a call to someone

https://callfirst.app/
1•fribble•2m ago•0 comments

iFixit Teardown: iPhone 18 Pro and Pro Max

https://www.ifixit.com/News/119329/inside-the-tiny-unfixable-eye-iphone-18-pro-and-pro-max-teardown
1•tosh•3m ago•0 comments

Jev 1.13 Jaggedness

https://docs.typesafe.ai/model-jaggedness/jev-1.13
1•Bluestein•4m ago•0 comments

TPM-Attest: Hardware-Rooted Anti-Cheat Alternative for Linux

https://arxiv.org/abs/2609.20909
1•sbulaev•9m ago•0 comments

Nimble takes some text and a schema, and makes typed decisions about the text

https://github.com/bespokelabsai/nimble
1•Bluestein•11m ago•0 comments

Show HN: Bitcoin-rs – An AI-assisted Bitcoin full node in Rust

https://github.com/gosuda/bitcoin-rs
5•dreamcacao02183•13m ago•1 comments

A Dangerous Castle

https://chloemashitermakesthings.wordpress.com/2026/09/14/a-dangerous-castle/
1•rdmuser•15m ago•0 comments

Generating Artist-Like 3D Mesh Topology via Nearest-Vertex Vector Fields

https://derkleineli.github.io/triflow/
1•ibobev•15m ago•0 comments

I'm afraid of spiders. So I made AI look at 2k of them

https://labqoat.com/blog/how-well-can-ai-identify-spiders
2•michalwarda•15m ago•0 comments

Sparse resources helped my GPU-driven renderer memory usage

https://zino2201.substack.com/p/how-sparse-resources-helped-my-gpu
1•ibobev•15m ago•0 comments

Gabor Fields: Orientation-Selective Level-of-Detail for Volume Rendering

https://arcanous98.github.io/projectPages/gaborVolumes.html
1•ibobev•16m ago•0 comments

OpenXLR – A Linux Variant of Elgato Wave Link

https://github.com/emaspa/openxlr
1•michaelbrooks•16m ago•0 comments

Show HN: A GeoJSON viewer that checks the bbox you declared

https://9revolution9.com/tools/geo/geojson-viewer
2•glassonion999•17m ago•0 comments

Thomson-1.0-Small LLM Developed by Thomson Reuters

https://featherless.ai/models/thomsonreuters/Thomson-1.0-Small
1•Bluestein•17m ago•0 comments

FSD Supervised now approved in Czech Republic

https://twitter.com/teslaeurope/status/2101947798933385410
1•tosh•17m ago•0 comments

WhatsApp Business Paid Support Is a Scam

1•MarcellusDrum•17m ago•1 comments

NILM to recover the energy consumption of individual appliances

https://github.com/goruck/nilm
1•gitowiec•18m ago•1 comments

Show HN: Grade text from the CLI with custom rulesets and Jev

https://github.com/lukstei/slop-grader
2•lukstei•19m ago•0 comments

Show HN: Gleamit – dental health tracker for Android/iOS

https://gleamit.app/
1•Uaitt•19m ago•0 comments

BicDB – a PostgreSQL-compatible database for local-first apps

https://github.com/nikoma/bicdb
2•nikoma777•21m ago•0 comments

AlternativeTo – Crowdsourced Software Recommendations

https://alternativeto.net
1•elliot_a•21m ago•0 comments

AI Data Center Basics: What Is Linear Pluggable Optics (LPO)?

https://blog.semtech.fr/ai-data-center-basics-what-is-linear-pluggable-optics-lpo
1•peter_d_sherman•21m ago•0 comments

Don't Use AI to Write

https://paulbakker.io/writing/no-ai-for-writing/
2•eigenBasis•21m ago•0 comments

DBClient: A native Mac database client for 12 engines (I'm the dev)

https://dbclient.net/
1•elgs•24m ago•0 comments

I found a better React color picker

https://www.npmjs.com/package/chroma-panel
1•itssohailkhan•24m ago•1 comments

The easiest-to-understand article I've read about Jev

https://inlevel9.com/en/issues/jev-judgment-not-writing
1•haebom•26m ago•0 comments

Calibre v9.15's "Create your own adventure" writing game

https://calibre-ebook.com/whats-new
1•tapanjk•26m ago•0 comments

Chinese CXMT to Match Micron's DRAM Manufacturing Capacity This Year

https://www.techpowerup.com/350726/chinese-cxmt-to-match-microns-dram-manufacturing-capacity-this...
1•tosh•30m ago•0 comments

Sonnex – A DAW for macOS

https://apps.apple.com/us/app/sonnex/id6757343055?mt=12
1•vali1•30m ago•1 comments

The Economic Incentives Behind the Push to Pause AI

https://www.vincentschmalbach.com/economic-incentives-behind-the-push-to-pause-ai/
2•vincent_s•35m ago•0 comments