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

The introverts are winning (2024)

https://newhumanist.org.uk/articles/6306/the-introverts-are-winning
1•avivby•2m ago•0 comments

AI Made Me 10x More Productive – Now What?

https://tidbits.mende.io/p/ai-made-me-10x-more-productive-now
1•avivby•2m ago•0 comments

Swim: Outsourced Heartbeats

https://benjamincongdon.me/blog/2025/12/09/SWIM-Outsourced-Heartbeats/
1•ingve•5m ago•0 comments

My Small Mouth

https://www.stallman.org/articles/mouth.html
1•frag•9m ago•0 comments

Browser extensions with a feed of personal dev blogs

https://www.alldevblogs.com/
2•alamando•9m ago•0 comments

What we learned from Red Teaming some of the fastest growing AI Startups

https://www.superagent.sh/blog/red-teaming-ai-agents-learnings
1•homanp•9m ago•0 comments

Org-roam: A plain-text personal knowledge management system

https://www.orgroam.com/
1•harryday•10m ago•0 comments

College Scorecard – Computer Science Earnings

https://collegescorecard.ed.gov/search/fos?sort=fos_median_earnings:desc&page=0&cip4=1107&cip4_de...
1•StromFLIX•10m ago•0 comments

Time in C++: std:chrono:high_resolution_clock – Myths and Realities

https://www.sandordargo.com/blog/2025/12/10/clocks-part-4-high_resolution_clock
1•ibobev•11m ago•0 comments

Meshoptimizer 1.0 Released

https://zeux.io/2025/12/09/meshoptimizer-v1/
1•ibobev•12m ago•0 comments

Induction Variables and Loops

https://xania.org/202512/09-induction-variables
1•ibobev•13m ago•0 comments

Show HN: I Build the Simplest and Cheapest Link-in-Bio Service

https://www.lnkr.ink/
3•andytriescoding•19m ago•0 comments

Math Predicting the Death of Nations [video]

https://www.youtube.com/watch?v=B5cMfyFqKmM
1•est•20m ago•0 comments

Nvidia builds location verification tech that could help fight chip smuggling

https://www.reuters.com/business/nvidia-builds-location-verification-tech-that-could-help-fight-c...
1•pella•28m ago•2 comments

China adds domestic AI chips to official procurement list for first time

https://www.ft.com/content/83c6521e-fe42-49e2-a9fe-eda97168b316
2•KnuthIsGod•32m ago•0 comments

Create High-Quality AI Videos Effortlessly with Wan 2.6

https://www.wan26.info
2•cy1414569•39m ago•1 comments

Reductive chain initiation through the thermal generation of CO2 anion

https://www.nature.com/articles/s44160-025-00919-z
1•PaulHoule•39m ago•0 comments

Where in the world are wealth and income most unequal?

https://www.aljazeera.com/news/2025/12/10/where-in-the-world-are-wealth-and-income-most-unequal
1•defrost•40m ago•0 comments

Firefox to create AI Window: Built for choice and control

https://www.firefox.com/en-US/ai/
2•bkma•40m ago•1 comments

StillMe – an open-source "transparent RAG" framework

1•Anh_Nguyen_vn•44m ago•0 comments

No Planet Money Not the Fake Graph

https://econchrisclarke.substack.com/p/no-planet-money-how-could-you-not
1•m-hodges•45m ago•0 comments

The Social Radars: Blake Scholl, Founder and CEO of Boom Supersonic

https://shortcast.me/i90blCKNjeKM9PPj6gQT
2•rokgregoric•47m ago•1 comments

Taming the CI Monster: How I Slashed Our Monorepo Build Times by over 66%

https://kmaliszewski9.github.io/ci/2025/02/22/sbt-monorepo.html
1•mleonhard•51m ago•0 comments

Paul Krugman Talking with Paul Kedrosky

https://paulkrugman.substack.com/p/talking-with-paul-kedrosky
2•DanielKehoe•57m ago•0 comments

OkayWebHost– A simple, India-based managed hosting

2•okaywebhost_com•1h ago•0 comments

UK porn traffic down since beginning of age checks but VPN use up, says Ofcom

https://www.theguardian.com/society/2025/dec/10/uk-porn-traffic-down-age-checks-vpn-use-up-ofcom
2•beardyw•1h ago•0 comments

NASA loses contact with MAVEN Mars orbiter

https://www.news9live.com/science/nasa-loses-contact-with-maven-mars-orbiter-2910772
3•ashishgupta2209•1h ago•0 comments

A3: Avoid Memos with an Agenda

https://entropicthoughts.com/a3-avoid-memos-with-an-agenda
2•nsm•1h ago•0 comments

Rhetorical Analysis of One Punch Man (2018)

https://tmportfolio18.commons.gc.cuny.edu/2018/11/12/rhetorical-analysis-of-one-punch-man/
2•wseqyrku•1h ago•0 comments

International Workshop on Plan 9: 2026 Edition

https://iwp9.org
2•birdculture•1h ago•0 comments