frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

CSS Wrapped 2025

https://chrome.dev/css-wrapped-2025/
1•zhs•29s ago•0 comments

If Your Electron App Is "Just a Browser Wrapper" You're Doing It Wrong

https://www.jasonscheirer.com/weblog/on-electron/
1•speckx•40s ago•0 comments

Static Linux

https://sta.li/index.html
1•Koshkin•46s ago•0 comments

Europe Is Under Siege

https://www.noahpinion.blog/p/europe-is-under-siege
2•alephnerd•3m ago•0 comments

Spotify Wrapped but for Your Terminal

https://github.com/thegoldenmule/terminal-wrapped
1•benthehutt•3m ago•0 comments

Show HN: DataKit, your all in browser data studio is open source now

https://github.com/Datakitpage/Datakit
1•aminkhorrami•4m ago•0 comments

An open-source, cross-platform Git client

https://github.com/markrai/gitpow
1•nhatcher•5m ago•0 comments

Freelancers are losing ~30% of their time and revenue to tool fragmentation

1•Abhijeetp_Singh•8m ago•0 comments

GitHub pull request suggestions escape repository context

1•mrdziuban•10m ago•0 comments

Congress warned that NASA's current plan for Artemis "cannot work"

https://arstechnica.com/space/2025/12/congress-told-there-needs-to-be-consequences-for-nasa-delay...
1•nobody9999•10m ago•1 comments

Generative AI use continues to rise

https://birchtree.me/blog/generative-ai-use-continues-to-rise/
2•speckx•11m ago•0 comments

Defunct Pennsylvania oil and gas wells may leak methane and metals into water

https://phys.org/news/2025-11-defunct-pennsylvania-oil-gas-wells.html
1•PaulHoule•11m ago•0 comments

Market fears mount over private credit inflating the AI bubble

https://www.capitalbrief.com/article/market-fears-mount-over-private-credit-inflating-the-ai-bubb...
2•zerosizedweasle•12m ago•0 comments

Show HN: OpsOrch – Unified API for Incidents, Logs, Metrics, and Tickets

https://www.opsorch.com/
6•yusufaytas•14m ago•0 comments

JuliaGrid: Julia Power System Simulation

https://mcosovic.github.io/JuliaGrid.jl/stable/
1•shallow-mind•14m ago•0 comments

ReductrAI – An AI brain for your infrastructure you can query in plain English

https://reductrai.com/
1•hermosillo_21•15m ago•1 comments

Meta acquires AI device startup Limitless

https://techcrunch.com/2025/12/05/meta-acquires-ai-device-startup-limitless/
1•chermanowicz•15m ago•1 comments

DuckPond: Building a Self-Hosted Data Warehouse with DuckDB, FastAPI, and React

https://datamethods.substack.com/p/duckpond-building-a-self-hosted-multi
1•zekrom•15m ago•0 comments

Apple Manufacturing Academy

https://manufacturingacademy.msu.edu/
1•franz899•16m ago•0 comments

Google Tells Advertisers It'll Bring Ads to Gemini in 2026

https://www.adweek.com/media/google-gemini-ads-2026/
3•pavel_lishin•16m ago•1 comments

More than 200 environmental groups demand halt to new US datacenters

https://www.theguardian.com/us-news/2025/dec/08/us-data-centers
3•thelastgallon•17m ago•0 comments

Springer retracts nearly 40M publications on 'bonkers' dataset

https://www.thetransmitter.org/retraction/exclusive-springer-nature-retracts-removes-nearly-40-pu...
1•riedel•17m ago•2 comments

Getting out of being people's secondary authoritative DNS server is hard

https://utcc.utoronto.ca/~cks/space/blog/sysadmin/DNSServerReferencesCanLinger
1•speckx•18m ago•0 comments

Clinically Meaningful Survival Benefit for Patients with Cell Lung Cancer

https://investors.biontech.de/news-releases/news-release-details/biontech-and-oncoc4-announce-cli...
1•doener•18m ago•0 comments

Nanomaterial-Induced Mitochondrial Biogenesis

https://www.pnas.org/doi/10.1073/pnas.2505237122
1•wjb3•19m ago•0 comments

Anthropic Sends Statsig Your User ID,IP,Email and Where to Find a SugarDaddy

1•miceprincipal•19m ago•0 comments

We might be living through the great cognitive decline in human history

https://medium.com/@kishore-jalleda/the-great-cognitive-decline-how-ai-is-atrophying-human-intell...
3•kishore-jalleda•19m ago•0 comments

AI poses a new antitrust problem

https://www.ft.com/content/307d5bb6-d02c-4052-8251-b0dad90a1c5f
3•cybersoyuz•20m ago•1 comments

GitHub no longer uses Toasts

https://primer.style/accessibility/toasts/
3•samsolomon•21m ago•0 comments

Disagreements over post-quantum encryption for TLS

https://lwn.net/SubscriberLink/1048978/8efe916082e53bfe/
2•todsacerdoti•21m ago•0 comments