frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

QtkTest: Go-To Human Benchmark Tool

https://qtktest.com/
1•yimiqidage001•4m ago•0 comments

Patents and Open Source: Understanding the Risks and Available Solutions

https://opensource.org/blog/patents-and-open-source-understanding-the-risks-and-available-solutio...
1•gslin•13m ago•0 comments

How to speed up the Rust compiler in December 2025

https://nnethercote.github.io/2025/12/05/how-to-speed-up-the-rust-compiler-in-december-2025.html
1•todsacerdoti•16m ago•0 comments

What I Learned from Vibe-Coding Auth with AI

https://fusionauth.io/blog/vibe-coding-authentication
1•mooreds•18m ago•0 comments

Trustworthy software through non-profits?

https://www.more-magic.net/posts/trustworthy-software-through-non-profits.html
1•sjamaan•19m ago•0 comments

Show HN: Who is hiring" search tool with chat / other features

https://nthesis.ai/public/hn-who-is-hiring
1•osigurdson•19m ago•0 comments

Speed vs. Safety: Building developer experience in a MedTech startup

https://bradleybeddoes.com/posts/building-developer-experience-in-medtech
1•vedlin•24m ago•0 comments

Walks in Rotation Spaces Return Home When Doubled and Scaled

https://arxiv.org/abs/2502.14367
1•nomilk•26m ago•1 comments

Craft Food Recipes

https://craftfoodrecipes.com/recipes
1•fastshort•27m ago•1 comments

LLM inference is nearly deterministic. We use this to audit providers

https://adamkarvonen.github.io/machine_learning/2025/11/28/difr.html
1•seraine•27m ago•0 comments

A space program can only move as swiftly as its rockets

https://jatan.space/indian-space-issue-33/
1•Brajeshwar•28m ago•0 comments

State Department to deny visas to fact checkers and others, citing 'censorship'

https://www.npr.org/2025/12/04/nx-s1-5633444/trump-content-moderation-visas-censorship
5•seattle_spring•31m ago•2 comments

Show HN: A Self-Evolving Agentic App Builder (Seeking 300 Beta Testers)

https://howone.ai/?invite=CD0AP6
2•EvoAgentX•31m ago•0 comments

Tim Pool on a Possible Magnetic Pole Shift Citing Multiple Signs [video]

https://www.youtube.com/watch?v=1lnwSEdxlhI
1•keepamovin•36m ago•2 comments

Starlink Mobile? SpaceX Trademark Filing Hints at Cellular Carrier Ambitions

https://www.pcmag.com/news/starlink-mobile-spacex-trademark-filing-hints-at-cellular-carrier-ambi...
1•TMWNN•36m ago•0 comments

Show HN: Personalized wine recommendations from a wine list

https://apps.apple.com/us/app/sip-savvy/id6747541871
1•zyncl19•37m ago•0 comments

Build Systems Are Spreadsheets

https://functional.computer/blog/build-systems-are-spreadsheets
1•judicious•40m ago•0 comments

Why Sourcegraph and Amp Are Becoming Independent Companies

https://sourcegraph.com/blog/why-sourcegraph-and-amp-are-becoming-independent-companies
2•amirathi•41m ago•0 comments

Nvidia CEO Jensen Huang admits he works 7 days a week, in a constant anxiety

https://fortune.com/2025/12/04/nvidia-ceo-admits-he-works-7-days-a-week-including-holidays-in-a-c...
2•wslh•42m ago•0 comments

T-17 Carbon Telephone Transmitter Button Mod and HodgePodge

http://k4che.com/T-17/T-17.htm
1•brudgers•44m ago•0 comments

Show HN: Driving Android app via LLM. Looking for feedback

1•philippb•50m ago•0 comments

What do you think of my landing Page designed in Canva

https://createamarketplace.com/
1•cladian•53m ago•2 comments

Netflix in exclusive talks to buy HBO

https://www.cnn.com/2025/12/04/media/netflix-paramount-wbd-bidding-war-warner-bros-discovery
7•mikeweiss•53m ago•3 comments

A Golden Year (2025): Gold's Price Surge – The Signal in the Noise

https://aswathdamodaran.blogspot.com/2025/11/a-golden-year-2025-golds-price-surge.html
1•kamaraju•55m ago•0 comments

Planet VPN

https://freevpnplanet.com/
1•bitlogicdev•56m ago•1 comments

Rats Snatching Bats Out of the Air and Eating Them–Researchers Got It on Video

https://www.smithsonianmag.com/smart-news/rats-are-snatching-bats-out-of-the-air-and-eating-them-...
2•bookofjoe•1h ago•0 comments

Heaven's Gate Public Key

https://www.heavensgate.com/misc/secure.htm
2•imwally•1h ago•1 comments

The Greenlandic Santa Claus: The Fairytale That Disappeared (2022)

https://www.sermitsiaq.ag/kultur/den-gronlandske-julemand-eventyret-der-forsvandt/313490
2•tokai•1h ago•0 comments

Energy-Generating Floor Tiles: How Pavegen Turns Steps into Power

https://insights.greyb.com/pavegen-energy-generating-floor-tiles-patents/
2•Rahul035•1h ago•1 comments

AI as a WordPress Fundamental

https://make.wordpress.org/core/2025/12/04/ai-as-a-wordpress-fundamental/
1•gslin•1h ago•0 comments