frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•11mo 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•11mo 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•11mo 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).

FDA approves first gene therapy for genetic hearing loss

https://www.nbcnews.com/health/health-news/fda-approves-first-gene-therapy-genetic-hearing-loss-r...
1•gmays•1m ago•0 comments

Sdsdsdsd

https://www.wontopos.com/
1•wontopos•1m ago

One CEO explains why she values her union workforce

https://www.fastcompany.com/91530758/one-ceo-explains-why-she-values-her-union-workforce
1•doctaj•2m ago•0 comments

OpenAI and Microsoft Reach Deal to Give Startup New Freedom

https://www.wsj.com/tech/ai/openai-and-microsoft-strike-truce-redrawing-once-tense-partnership-9a...
2•JumpCrisscross•2m ago•0 comments

Ask HN: What is the current trend of Startups in AI

1•ishqdehlvi•3m ago•0 comments

Derek Sivers: Why I turned down a billion dollars

https://sive.rs/2024-09-billions
2•theorchid•6m ago•0 comments

That time I Was a Camgirl

https://substack.com/home/post/p-195290519
2•eatitraw•8m ago•0 comments

Show HN: Drive any macOS app in the background without stealing the cursor

https://github.com/trycua/cua
1•frabonacci•9m ago•0 comments

What Happens If the U.S. Seizes AI Companies?

https://www.theatlantic.com/technology/2026/04/ai-nationalization-trump-hegseth-anthropic-openai/...
2•JumpCrisscross•9m ago•0 comments

Compositing and Blending

https://nik.digital/posts/compositing-blending
1•NikxDa•10m ago•1 comments

Deadly deepfakes: A survival guide for the age of algorithmic war

https://restofworld.org/2026/deepfakes-ai-war-disinformation/
1•speckx•10m ago•0 comments

How the Heck Do QR Codes Work?

https://perthirtysix.com/how-the-heck-do-qr-codes-work
1•dg-ac•11m ago•0 comments

Hallucinated citations are polluting the scientific literature

https://www.nature.com/articles/d41586-026-00969-z
3•the-mitr•12m ago•1 comments

"Its just CRUD", and other misconceptions when thinking 'I can vibe build a CMS'

https://www.datocms.com/blog/build-a-cms-with-vibes
4•pikachuproblem•12m ago•0 comments

Pokémon Explorer. Explore 9 generations of Pokémon

https://perthirtysix.com/tool/pokemon-explorer
1•dg-ac•13m ago•0 comments

Give your agent feedback loops

https://ben.page/feedback-loops
2•emschwartz•13m ago•0 comments

Meta Buys AWS Graviton Arm Cores in a CPU Land Grab – ServeTheHome

https://www.servethehome.com/meta-buys-tens-of-millions-of-aws-graviton-arm-cores-in-a-cpu-land-g...
1•rbanffy•15m ago•0 comments

Linux 7.1 Adds SoC Slider Support to x86_energy_perf_policy Utility

https://www.phoronix.com/news/Linux-7.1-SoC-Slider-Utility
1•rbanffy•16m ago•0 comments

Tiny Cogs

https://zacharykai.net/notes/50cogs
1•rishikeshs•17m ago•0 comments

Bottle Parking [video]

https://www.youtube.com/watch?v=h0q4en5RdPw
2•rishikeshs•18m ago•0 comments

Bytes of CSS to look great nearly everywhere

https://gist.github.com/JoeyBurzynski/617fb6201335779f8424ad9528b72c41
1•maksimur•18m ago•0 comments

Tendril – a self-extending agent that builds and registers its own tools

https://github.com/serverless-dna/tendril
1•walmsles•19m ago•1 comments

The Cost of a Frame

https://twitter.com/c_valenzuelab/status/2048744608524325270
2•jger15•19m ago•0 comments

Top takeaways from scanning 1M domains

https://dialtoneapp.com/2026/april/top-10-takeaways-from-scanning-1M-domains
1•fcpguru•20m ago•1 comments

Essentail Transitions for Web Apps

https://transitions.dev/
1•jakubkubo•22m ago•0 comments

Teardown of AlphaFold codebase with a AST-free LLM-free static analysis engine

https://squid-protocol.github.io/gitgalaxy/museum-of-code/alphafold_teardown.html
1•squid-protocol•22m ago•1 comments

Show HN: Plate – The fastest way to run projects without becoming a PM tool

https://plate.to
5•losteden1•28m ago•0 comments

The next phase of the Microsoft OpenAI partnership – OpenAI

https://openai.com/index/next-phase-of-microsoft-partnership/
20•helsinkiandrew•29m ago•10 comments

Sophie's Grids

https://solhsa.com/oldernews2026.html#SOPHIE-S-GRIDS
2•ibobev•29m ago•0 comments

A tool to turn unstructured financial news into actionable insights

https://newsfinanceai.com/landing-page/
1•globalbiz•29m ago•0 comments