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

The Elite Overproduction Hypothesis (2025)

https://www.noahpinion.blog/p/the-elite-overproduction-hypothesis-994
1•ridiculous_leke•4m ago•0 comments

China is an engineers' country, but US and Germany are now lawyers' countries

https://www.globaltimes.cn/page/202605/1360255.shtml
1•e2e4•7m ago•1 comments

Quantum in Biology, Quantum for Biology, and Biology for Quantum

https://arxiv.org/abs/2605.00205
1•mathgenius•9m ago•0 comments

Filen deleted all of my data. A heads-up for others

https://www.reddit.com/r/DataHoarder/s/S592zuF3Ub
2•nixass•10m ago•0 comments

Apple confirms iOS 26.5 Messages app adds RCS end-to-end encryption

https://9to5mac.com/2026/05/04/apple-confirms-ios-26-5-messages-app-adds-rcs-end-to-end-encryption/
3•latchkey•11m ago•0 comments

The Effects of School Phone Bans: National Evidence from Lockable Pouches

https://www.nber.org/papers/w35132
2•goplayoutside•15m ago•1 comments

Zopfli Optimization – Free Bandwidth (2016)

https://blog.codinghorror.com/zopfli-optimization-literally-free-bandwidth/
1•tracker1•16m ago•1 comments

YouTube now has customizable multiview

https://www.androidauthority.com/youtube-tv-customizable-multiview-how-to-make-3660768/
1•andsoitis•16m ago•0 comments

Agent Skills

https://addyosmani.com/blog/agent-skills/
3•BOOSTERHIDROGEN•16m ago•0 comments

Ask HN: Data Storage on Fractals

1•zipotm•18m ago•0 comments

Finance OS – self-hosted personal finance tracker, no bank credentials required

https://github.com/aiden202023/finance-os
1•atlguys18•20m ago•0 comments

Show HN: Layers – AI skills for deep product design

https://layers.jamiemill.com/
2•jm25•22m ago•0 comments

Moop: A free and open-source image optimizer for macOS

https://zrubinrattet.github.io/moop/
1•thebigship•22m ago•0 comments

Trump's World Liberty Financial Sues Billionaire Justin Sun for Defamation

https://www.forbes.com/sites/alisondurkee/2026/05/04/trumps-world-liberty-financial-sues-billiona...
1•iamben•25m ago•0 comments

Deep Learning with Python – Read Online

https://deeplearningwithpython.io/
1•mathgenius•25m ago•0 comments

Warren Buffett Warns That Prediction Markets Are 'Gambling,' Not Investing

https://www.thenewstribune.com/money/warren-buffett-prediction-markets-gambling/
3•ppjim•26m ago•0 comments

MorphKatz – polymorphic x64 machine-code rewriter for Windows PEs

https://github.com/0xMohammedHassan/morphkatz
1•Motx•28m ago•0 comments

Exploring the behavior of a strung computational Stradivarius violin

https://www.nature.com/articles/s44384-026-00049-6
3•bookofjoe•28m ago•0 comments

Can agents replace the search stack?

https://softwaredoug.com/blog/2026/04/28/search-apis-replaced-by-agents.html
1•gmays•30m ago•0 comments

Canadian election databases use "canary traps"–and they work

https://arstechnica.com/tech-policy/2026/05/in-canada-a-canary-trap-springs-shut-and-ids-election...
3•ColinWright•31m ago•0 comments

Show HN: A customer feedback and public roadmap for digital products

https://insightswall.com
2•xcanchal•31m ago•0 comments

'Point of no return': New Orleans relocation must start now due to sea level

https://www.theguardian.com/us-news/2026/may/04/new-orleans-sea-levels-relocation-climate-crisis
7•dmm•31m ago•0 comments

What to Know Before Owning a Cleanroom

https://www.terrauniversal.com/photogallery/cleanrooms.php?video=22980
1•gregsadetsky•31m ago•0 comments

Evolving Verifiable Trust: Bringing Binary Transparency to the Android Ecosystem

https://blog.google/security/bringing-binary-transparency-to-the-android-ecosystem/
1•concinds•36m ago•0 comments

Welcome to Gas City

https://steve-yegge.medium.com/welcome-to-gas-city-57f564bb3607
15•teruakohatu•38m ago•21 comments

New kew v4.0 "Love is gonna save us edition" [video]

https://www.youtube.com/watch?v=Ql5ZKeaX2MQ
1•ravachol•39m ago•1 comments

Pulitzer Prize Winners 2026

https://www.pulitzer.org/prize-winners-by-year/2026
3•brightbeige•42m ago•1 comments

Individual efficiency vs. administrative efficiency (2024)

https://longform.asmartbear.com/tension-autonomy-admin/
1•mooreds•43m ago•0 comments

SAP Acquiring Dremio

https://www.dremio.com/blog/sap-intends-to-acquire-dremio/
1•jamesblonde•44m ago•0 comments

Blepping in Cats

https://archcreekanimalclinic.com/blepping-in-cats/
1•mooreds•44m ago•0 comments