frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

JLink JTAG Access on the Pinecil

https://danielmangum.com/posts/jlink-jtag-pinecil/
1•hasheddan•1m ago•0 comments

Show HN: Oneconfig – Set up any dev envs with one command

https://github.com/Thanos2002/Oneconfig
1•ThanosAkr•4m ago•0 comments

Gmail Thinks I'm Stupid, So I Left

https://moddedbear.com/gmail-thinks-im-stupid-so-i-left
1•speckx•4m ago•0 comments

Ask HN: Are you updating your app to comply with Texas SB2420 age verification?

1•smalltorch•6m ago•0 comments

Amazon faces class action lawsuit over Ring facial-recognition feature

https://techcrunch.com/2026/06/02/amazon-faces-class-action-lawsuit-over-ring-facial-recognition-...
3•rolph•9m ago•0 comments

Scientists Find Groundbreaking Amputated Tissue Regrowth

https://www.bigelow.org/news/articles/2026-05-27.html
2•wjSgoWPm5bWAhXB•10m ago•0 comments

Pragya – Personal Assistant that works across your apps

https://play.google.com/store/apps/details?id=com.pragya.personalai&hl=en_US
1•kshitij_dubey15•11m ago•0 comments

Bird Course – a short memoir of physics

https://kennerg.substack.com/p/bird-course
1•ikerrin1•13m ago•0 comments

Vivaldi (Chrome) ruining website colors

https://yeechie.nl/vivaldi-chrome-ruining-website-colors
1•speckx•13m ago•0 comments

Show HN: Building an Unique Braille Loader for My AI Startup

https://dominikkoch.dev/blog/building-an-unique-braille-loader-for-my-ai-startup
1•DominikKoch•13m ago•0 comments

Google rolls out fake call detection to protect against AI impersonation scams

https://techcrunch.com/2026/06/02/google-rolls-out-fake-call-detection-to-protect-against-ai-deep...
1•rolph•13m ago•0 comments

Digital Marketer

https://simplifysuite.io/
1•lohithlalesh•14m ago•0 comments

A full-stack Last.fm 1k dataset insights page using Go/ClickHouse/React

https://github.com/el10savio/artistInsights
1•ugabuga•15m ago•0 comments

The Autism-Therapy Business Is Booming–and So Is the Billing Abuse

https://www.wsj.com/health/healthcare/autism-therapy-insurance-bills-880b9dba
3•impish9208•15m ago•1 comments

Show HN: A Bay Area theme monopoly style game

https://topdog-dev.netlify.app/
1•pennystudio-li•15m ago•1 comments

Android will now warn you if a caller is impersonating someone you know

https://www.engadget.com/2184125/android-will-now-warn-you-if-a-caller-is-impersonating-someone-y...
2•rolph•16m ago•0 comments

Trump signs an executive order to vet top AI models for national security risks

https://apnews.com/article/trump-ai-executive-order-e41af74f7b0865482f07d10fe7a50fe3
1•geox•16m ago•1 comments

Guess where this publicly exposed webcam is on a map

https://stumbletv.alec.is/c/14918c8362aef6f9
1•arm32•16m ago•0 comments

Karpathy's LLM teaching corpus, rendered as a designed HTML wiki

https://benzales.github.io/notes/
2•gonzally•17m ago•0 comments

UMA Playground

https://aidemos.atmeta.com/uma
1•ray__•20m ago•0 comments

The History of Red (audio)

https://www.poetryfoundation.org/audio/161431/the-history-of-red
1•mooreds•20m ago•0 comments

Show HN: SwitchSearch – A tiny extension that makes you less dependent on Google

https://github.com/thedmdim/switchsearch
1•nabhasablue•27m ago•1 comments

China conducts surprise launch of Long March 12B, delivers Qianfan satellites on

https://spacenews.com/china-conducts-surprise-launch-of-long-march-12b-delivers-qianfan-satellite...
1•bookmtn•27m ago•1 comments

HP re-releases classic computer science calculator: The HP-16C

https://hpcalcs.com/product/hp-16c-collectors-edition/
3•dm319•29m ago•0 comments

The "ChangeNames.co.uk" Scam

https://danq.me/2026/06/01/changenames-scam/
1•speckx•30m ago•0 comments

The web wasn't built for agents, here's how we built a harness to make it work.

https://www.browserbase.com/blog/what-is-a-browser-agent-harness
9•Kylejeong21•30m ago•0 comments

Text Makeup

https://text.makeup/#example-decoding-emoji
1•matthberg•32m ago•0 comments

Let's Build the Dream Team

1•EL_ARDORR•34m ago•3 comments

People are flooding AI chatbots with health questions. Microsoft Mayo Clinic

https://www.cnn.com/2026/06/02/tech/ai-for-healthcare-microsoft-mayo-clinic
2•Bender•35m ago•1 comments

The Mission to Get Breakthrough Brain Treatments to Everyone

https://www.youtube.com/watch?v=YpqVcD6tc5U
1•turizzmo•36m ago•0 comments