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

Apple takes down billboard after accusations of 'electronic babysitting'

https://9to5mac.com/2026/08/14/apple-takes-down-billboard-after-accusations-of-normalizing-electr...
1•latexr•1m ago•0 comments

The price of a Costco hot dog has gone up

https://sina.bio/posts/costco-hotdog.html
1•sinab•3m ago•0 comments

CheckMate: An RPG inspired habit tracker with quests, co-op raids, Journal

https://checkmate-daily.com/
1•cionutd•4m ago•1 comments

Empty shelves or lost keys? Recall is the bottleneck for parametric factuality

https://research.google/blog/empty-shelves-or-lost-keys-recall-is-the-bottleneck-for-parametric-f...
1•Anon84•4m ago•0 comments

The Architectural Hostility of Doorknobs (2025)

https://sightlessscribbles.com/posts/doorknob-hostility/
1•jllyhill•5m ago•0 comments

Does vitriol make you feel special?

https://news.harvard.edu/gazette/story/2026/08/does-vitriol-make-you-feel-special/
1•thisislife2•5m ago•0 comments

Show HN: Kungfu – One human, agents, and 3,467 merged PRs in 30 days

https://kungfu.tech/
1•dongkeren•6m ago•0 comments

Ask HN: How to Stay Marketable in the AI Era?

1•OulaX•6m ago•0 comments

Semaglutide linked to 26% lower 5-year predicted dementia risk

https://alz-journals.onlinelibrary.wiley.com/doi/10.1002/dad2.70432
2•randycupertino•6m ago•1 comments

Show HN: Mimi – the free language learning app that anyone can edit

https://mimilearn.org/
1•sapphire42•7m ago•0 comments

Show HN: I built an iOS calorie tracker to replace my three fitness apps

https://apps.apple.com/us/app/youcal-ai-calorie-tracker/id6753720597
1•kimmarqly•8m ago•0 comments

SpaceX has acquired coding AI startup Cursor

https://www.engadget.com/2237655/spacex-officially-acquired-ai-coding-startup-cursor/
1•NordStreamYacht•8m ago•0 comments

CredOclock – email reminders before your team's API keys/certs expire

https://credoclock.com/
1•Enox77•10m ago•0 comments

Bbv is a minimalist data plotter/viewer for the command line

https://github.com/ftonneau/bbv
1•kermatt•12m ago•0 comments

I wrote a mini CSS framework on a train ride and it took months to document

https://crayoncss.com/
1•TeriyakiBomb•12m ago•1 comments

New PI formula discovered [video]

https://www.youtube.com/watch?v=_epnm_xn3kc
1•MysteryPancake•13m ago•0 comments

Mee Manga Translator: AI manga translation that preserves original artwork

https://mangatranslator.me/
1•jacobmillerv•14m ago•0 comments

Show HN: I made an ultrafast racing game like F-zero but for mobile

1•kingofspain•15m ago•0 comments

Prof. Dr. Style

https://contemporary-home-computing.org/prof-dr-style/
2•jruohonen•17m ago•0 comments

Carbonless: Measure and reduce your website carbon

https://carbonless.cc
2•stfurkan•18m ago•0 comments

Ask HN: What agent skills are necessary?

2•justchad•20m ago•1 comments

RL Framework for Finetuning Openweight Models

https://github.com/stateset/stateset-agents
1•domsteil•22m ago•0 comments

Scientists increasingly depend on 'black-box' tools they cannot control

https://news.exeter.ac.uk/research/scientists-increasingly-depend-on-black-box-tools-they-cannot-...
5•geox•24m ago•0 comments

Unintended Consequences?

https://interfacecritique.net/journal/beal/
1•jruohonen•25m ago•0 comments

The curious case of Google's AlloyDB

https://boringsql.com/posts/google-alloydb/
4•Tomte•27m ago•0 comments

The Unreasonable Effectiveness of Property Testing for Validating Formal Specs

https://proofsandintuitions.net/2026/05/18/property-based-testing-specifications/
1•_doctor_love•27m ago•0 comments

Show HN: Between Tokens – an interactive piece where you are the language model

https://chrisjz.github.io/between-tokens/
4•chrisjz•28m ago•2 comments

When the Hard Part Stops Being Hard

https://proofsandintuitions.net/2026/08/14/when-the-hard-part-stops-being-hard/
1•_doctor_love•28m ago•0 comments

Has anyone tried this tool to improve LLM visibility?

https://see-geo.com
1•tnaaron•29m ago•0 comments

The Anatomy of Influence

https://www.bitchute.com/video/5L9zy5cKZVw8/
1•untiledsource•33m ago•0 comments