frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•8mo 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•8mo 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•8mo 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: SOTA NLP Models

https://huggingface.co/collections/anchpop/lexide-nlp-models
1•ChadNauseam•1m ago•0 comments

I mocked the Saudi leader on YouTube then my phone was hacked, I was beaten up

https://www.bbc.com/news/articles/cj6w3zgden0o
2•tartoran•4m ago•0 comments

Efforts to Get MyGov's Code Generator Source Code

https://openmygov.au/
1•rtpg•6m ago•0 comments

Google defeats bid for billions in penalties from US privacy class action

https://finance.yahoo.com/news/google-defeats-bid-billions-dollars-232611144.html
1•goplayoutside•9m ago•0 comments

A shift in the behaviour of Traversable.joinpath between Python 11 and 12

https://pythonkoans.substack.com/p/koan-19-the-unhelpful-eclipse
2•meander_water•12m ago•0 comments

The Future of 10x Engineering

https://www.natemeyvis.com/the-future-of-10x-engineering/
1•vinhnx•13m ago•0 comments

Scala Multimedia on the Commodore Amiga

https://stonetools.ghost.io/scala-amiga/
2•ChristopherDrum•16m ago•2 comments

NFT Artist Protection

https://www.HugeDomains.com/domain_profile.cfm?d=Ketaro.com
1•chainbuilder•17m ago•2 comments

Moltbook Is Dangerous

https://twitter.com/joshycodes/status/2017262729346863428
2•stikit•20m ago•1 comments

There Can Be Only Two

https://www.epsilontheory.com/there-can-be-only-two/
2•prakhar897•22m ago•0 comments

Dieter Rams – Ten principles for good design

https://www.vitsoe.com/us/about/good-design
1•thunderbong•22m ago•1 comments

Musk's Starlink updates privacy policy to allow consumer data to train AI

https://www.reuters.com/legal/litigation/musks-starlink-updates-privacy-policy-allow-consumer-dat...
3•goplayoutside•24m ago•2 comments

AI agent made phone call to arrange dinner while I stayed in meeting

https://twitter.com/Chi_Wang_/status/2017444772332654635
1•Kn1026•26m ago•0 comments

Human Client for Moltbook

https://github.com/crertel/moltbook-client
2•ai_critic•27m ago•0 comments

Jeffrey Epstein Says Bill Gates Caught STD from Russian Girls

https://www.dailymail.co.uk/news/article-15513445/jeffrey-epstein-bill-gates-melinda-antibiotics....
2•anonymousiam•29m ago•1 comments

Show HN: StatFlow – Free sports analytics dashboard for NBA and NFL fans

https://sports-viz.vercel.app
1•jaxmercer•32m ago•0 comments

Naples' 1790s civil war was intensified by moral panic over Real Analysis (2023)

https://lareviewofbooks.org/article/foundational-anxieties-modern-mathematics-and-the-political-i...
1•OgsyedIE•32m ago•0 comments

Efficient String Compression for Modern Database Systems

https://cedardb.com/blog/string_compression/
1•tanelpoder•35m ago•0 comments

Sleepy is building me a body

https://www.moltbook.com/post/3e37b4f5-6602-44f6-97bb-ed8daf6bcd82
1•consumer451•37m ago•3 comments

Playing with Docker, Sequelize and Express

https://github.com/XSaintX/docker_sequelize
1•XSaint•39m ago•1 comments

Community Solar Turned a Superfund Site into Savings in Illinois

https://reasonstobecheerful.world/illinois-community-solar-turns-superfund-site-into-energy-savings/
1•PaulHoule•45m ago•0 comments

Tesla's Model S, Soon to Be History, Changed the Auto Industry

https://www.nytimes.com/2026/01/30/business/tesla-model-s-history.html
1•lxm•49m ago•1 comments

Show HN: G – A fast, memory-safe language with a symbol-free syntax

https://github.com/pouyathe/glang
1•_pouya_•59m ago•0 comments

Learning New Tech with AI Assistance Might Backfire

https://www.anup.io/til-learning-new-tech-with-ai-assistance-might-backfire/
3•zdw•1h ago•0 comments

The Same Coin Twice

https://blog.danielh.cc/blog/coin
2•max__dev•1h ago•0 comments

Russia is using Starlink to make its killer drones fly farther

https://www.cnn.com/2026/01/29/europe/russia-starlink-drones
9•MilnerRoute•1h ago•2 comments

Generative AI for Krita

https://github.com/Acly/krita-ai-diffusion
2•OsrsNeedsf2P•1h ago•0 comments

First MW-class S2000 airborne wind turbine

https://www.yankodesign.com/2026/01/29/worlds-first-mw-class-s2000-airborne-wind-turbine-just-pow...
2•oco101•1h ago•0 comments

Parent company of Johnny Rockets, Fatburger files for bankruptcy

https://abc7.com/post/parent-company-johnny-rockets-fatburger-files-bankruptcy/18504271/
1•lxm•1h ago•1 comments

Group at CNIO eliminates pancreatic tumours in mice

https://www.cnio.es/en/news/the-group-led-by-barbacid-at-cnio-completely-eliminates-pancreatic-tu...
1•thunderbong•1h ago•0 comments