frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Odd Symmetry Between Earth's Northern and Southern Hemispheres Is Breaking Down

https://gizmodo.com/the-odd-symmetry-between-earths-northern-and-southern-hemispheres-is-breaking...
1•Brajeshwar•51s ago•0 comments

The Trillion Dollar Scam – How Google Makes Money [video]

https://www.youtube.com/watch?v=BfNIRyPi5QA
1•Biohazard•55s ago•0 comments

NASA's X-59 'quiet' supersonic jet makes historic first flight

https://www.space.com/technology/aerospace/nasas-x-59-quiet-supersonic-jet-makes-historic-1st-fli...
1•Brajeshwar•1m ago•0 comments

You have one week to opt out or become fodder for LinkedIn AI training

https://www.theregister.com/2025/10/27/linkedin_ai_profile_scraping/
1•Brajeshwar•1m ago•0 comments

Carlo Rovelli's Radical Perspective on Reality

https://www.quantamagazine.org/carlo-rovellis-radical-perspective-on-reality-20251029/
1•pseudolus•1m ago•0 comments

AWS US-EAST-1 region in trouble again, with EC2 and container services impacted

https://www.theregister.com/2025/10/29/aws_us_east_1_more_problems/
2•Bender•3m ago•1 comments

CNN Accelerator Based on Low-End FPGA with Optimized Convolutions

https://www.mdpi.com/2673-2688/6/10/244
1•PaulHoule•3m ago•0 comments

Debugging a 32,767 Thread Leak in Apache Hadoop ABFS

https://mattduran.info/2025/10/2025-10-24-debugging-memory-leak
1•isthisme•4m ago•0 comments

TrueNAS 25.10 Released with NVMe-Of Support, OpenZFS Performance Improvements

https://www.phoronix.com/news/TrueNAS-25.10
2•Bender•7m ago•0 comments

Generative AI Security: The Shared Responsibility Framework

https://www.enkryptai.com/shared-responsibility
1•mooreds•7m ago•0 comments

Normalize Identifying Corporate Devices in Your Software

https://lgug2z.com/articles/normalize-identifying-corporate-devices-in-your-software/
2•Bogdanp•7m ago•0 comments

Toyota BEVs Gain Support for Apple Maps EV Routing

https://www.macrumors.com/2025/10/28/toyota-bz-apple-maps-ev-routing/
1•Bogdanp•7m ago•0 comments

Aisuru Botnet Shifts from DDoS to Residential Proxies

https://krebsonsecurity.com/2025/10/aisuru-botnet-shifts-from-ddos-to-residential-proxies/
1•Bender•8m ago•0 comments

The Acid Test of 3I/Atlas at Perihelion

https://avi-loeb.medium.com/the-acid-test-of-3i-atlas-at-perihelion-ce131eca8485
2•fauria•8m ago•0 comments

Nvidia, Cisco look to deepen AI innovation across 6G, telecoms

https://www.computerweekly.com/news/366633381/Nvidia-Cisco-look-to-deepen-AI-innovation-across-6G...
2•beardyw•9m ago•1 comments

Generalized Consensus: Ordering Decisions

https://multigres.com/blog/generalized-consensus-part5
1•sougou•9m ago•1 comments

Grokipedia: A First Look – Larrysanger.org

https://larrysanger.org/2025/10/grokipedia-a-first-look/
1•bilsbie•10m ago•0 comments

$2.7B Agent Tax Crisis: First-ever study on how AI agents avoid tax

https://paid.ai/blog/ai-agents/the-2-7-billion-agent-tax-crisis-first-ever-study
1•arnon•11m ago•0 comments

Cancerous oil-field wastewater is spreading through Oklahoma water supply

https://www.propublica.org/article/oklahoma-oil-gas-wastewater-pollution
2•ck2•12m ago•0 comments

ISRO readies LVM3-M5 for launch of heaviest communication satellite CMS-03

https://www.thehindubusinessline.com/news/science/isro-readies-lvm3-m5-for-launch-of-heaviest-com...
1•thunderbong•13m ago•0 comments

I wish Firefox Profiles supported assigning websites to profiles

https://utcc.utoronto.ca/~cks/space/blog/web/FirefoxProfilesOpenSiteInWish
3•speckx•14m ago•0 comments

A Correction in Compute: Tracing the Decline in H100 Rental Prices

https://medium.com/@cli_87015/a-correction-in-compute-tracing-the-decline-in-h100-rental-prices-a...
1•gradus_ad•15m ago•0 comments

The Innovation That's Killing Restaurant Culture

https://www.theatlantic.com/culture/2025/10/food-delivery-america/684700/
1•BeetleB•15m ago•0 comments

Are Hashtags Dead? Not quite. They've just grown up

https://blog.postly.ai/are-hashtags-dead-spoiler-no-but-theyve-changed/
1•iampaulonu•16m ago•0 comments

Collins Aerospace: Sending text messages to the cockpit with test:test

https://www.ccc.de/en/disclosure/collins-aerospace-mit-test-test-textnachrichten-bis-ins-cockpit-...
2•hacka22•16m ago•0 comments

Loggr: Processing 250M logs in 11.5s on a laptop with on-the-fly 5× compression

https://medium.com/@fgauthier_36718/loggr-processing-250m-logs-in-11-5s-on-a-laptop-with-on-the-f...
1•fsg-swl•17m ago•1 comments

Speculations about DeepSeek-OCR and Quantization

https://dgsq.net/posts/2025-10-29-deepseek-ocr.html
1•dgsq•18m ago•0 comments

Hours Without A.I

https://www.nytimes.com/video/technology/100000010483638/48-hours-without-ai.html
1•fleahunter•21m ago•0 comments

Show HN: Optimize Databricks SQL

3•karamazov•21m ago•0 comments

Stream Processing of Financial Factors in High-Frequency Trading

https://medium.com/@DolphinDB_Inc/stream-processing-of-financial-factors-high-frequency-implement...
2•CrazyTomato•22m ago•0 comments