frontpage.
newsnewestaskshowjobs

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

OpenAI open-sources Codex Security CLI for repository scans and CI

https://runtimewire.com/article/openai-open-sources-codex-security-cli-typescript-sdk
1•ryanmerket•3m ago•0 comments

Knitting the Web: We Need Interlinkers

https://brennan.day/knitting-the-web-we-need-interlinkers/
1•cosmicgadget•3m ago•0 comments

Hedge funds face demands to stump up collateral as AI stocks tumble

https://www.ft.com/content/5c8a2816-8f28-4257-8707-b22ebaa6089c
1•mapping365•4m ago•0 comments

Show HN: Cloudflarebase – open-source Firebase alternative on Cloudflare

https://github.com/cloudflarebase/cloudflarebase
1•alex_equimake•6m ago•0 comments

Stop Building Spas for Internal Tools: The Modern PHP Alternative

https://www.gridphp.com/blog/stop-building-spas-for-internal-tools-the-modern-php-alternative/
1•gridphp•8m ago•0 comments

Apple becomes second $5T company as investors flee AI stocks

https://www.theguardian.com/technology/2026/jul/28/apple-second-ever-5tn-company-as-investors-fle...
3•devonnull•9m ago•0 comments

Timing of When Ingredients Are Added to Recipes

https://old.reddit.com/r/dataisbeautiful/comments/1v9bq7i/oc_timing_of_when_ingredients_are_added...
1•embedding-shape•10m ago•0 comments

From Cracker Barrel to Boeing, Companies Are Turning to Retired CEOs

https://www.wsj.com/business/from-cracker-barrel-to-boeing-companies-are-turning-to-retired-ceos-...
1•petethomas•11m ago•0 comments

Async-Profiler and OpenTelemetry Spans

https://krzysztofslusarski.github.io/2026/07/27/spans.html
1•mfiguiere•16m ago•0 comments

TSMC is accelerating Arizona factory build-out to capitalize on AI 'megatrend'

https://www.cnbc.com/2026/07/20/tsmc-arizona-fab-capacity-ai-chip-demand.html
2•gmays•19m ago•0 comments

Cursor and Together AI deliver real-time, low-latency inference at scale

https://www.together.ai/customers/cursor
1•inferhaven•20m ago•0 comments

There's Hope in Hard Truths

https://shannadige.com/blog/hard-truths/
1•shannadige•21m ago•1 comments

Epic diarrhea outbreak has 40% of Americans avoiding fruits and veggies

https://arstechnica.com/health/2026/07/epic-diarrhea-outbreak-has-40-of-americans-avoiding-fruits...
4•ValentineC•21m ago•0 comments

Watch out for missed warnings on vendor C++ toolchains

https://blog.poly.nomial.co.uk/2026-03-31-watch-out-for-missed-warnings-on-vendor-cpp-toolchains....
1•luu•22m ago•0 comments

ReFrame – The EPaper Camera

https://reframe.camera/
1•phil294•24m ago•0 comments

Show HN: Resultant Engineering Website

https://resultant.tools/
1•will2092347•25m ago•0 comments

What Happened to Ashton-Tate and DBase

https://dfarq.homeip.net/what-happened-to-ashton-tate-and-dbase/
1•symisc_devel•25m ago•0 comments

Shiftall mutalk 2 Wireless Soundproof Microphone

https://haruyama365.com/products/shiftall-mutalk-2-wireless-soundproof-microphone
1•gregsadetsky•28m ago•0 comments

Agenthound – Offensive security framework for AI agent infrastructure

https://github.com/adithyan-ak/agenthound
1•akoffsec•28m ago•0 comments

Tyler Cowen on reading fast, reading well, and reading widely (2020)

https://www.driverlesscrocodile.com/books-and-recommendations/tyler-cowen-on-reading-fast-reading...
2•downbad_•29m ago•1 comments

How to pay your rent with your open source project (2020)

https://plausible.io/blog/open-source-funding
1•downbad_•29m ago•1 comments

eBay reaches $56M settlement with e-commerce newsletter writers

https://techcrunch.com/2026/07/28/ebay-reaches-56m-settlement-with-e-commerce-newsletter-writers-...
1•rndsignals•29m ago•0 comments

WhistlinDiesel Cybertruck Durability Test #3 [video]

https://www.youtube.com/watch?v=ey0ZAaF2L4E
2•Bender•29m ago•0 comments

Agency Is the Job Now

https://www.drjoshcsimmons.com/writing/agency-is-the-job-now
2•joshcsimmons•30m ago•0 comments

American Airlines flights grounded nationwide due to IT outage: FAA

https://abcnews.com/US/american-airlines-flights-grounded-nationwide-due-outage-faa/story?id=1351...
7•computerliker•31m ago•1 comments

Alpha Inference

https://alphainference.app/
1•Estebanmtl•32m ago•0 comments

Show HN: Magpie, a CLI to Turn Your AI Agent into a Bookkeeper

https://github.com/kyle-visner/magpie
1•kvisner•34m ago•0 comments

From GPT2 to Kimi3

https://twitter.com/waterloo_intern/status/2081762065392541951
1•ridiculous_leke•36m ago•0 comments

I built an iOS camera that cryptographically verifies media at capture

https://www.apexverify.tech/
1•therisinggg•40m ago•0 comments

Parsers don't have to be complicated

https://bkaradzic.github.io/posts/scanner/
2•smusamashah•42m ago•0 comments