frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

A 3D Lattice Boltzmann solver with 200x compute acceleration

https://frontend-seven-delta-66.vercel.app/
1•kauai1•6m ago•0 comments

Ask HN: Would you buy a TRON: legacy neon line clothes?

1•alonsovm44•9m ago•1 comments

Hacker Dojo

https://en.wikipedia.org/wiki/Hacker_Dojo
1•Austin_Conlon•11m ago•0 comments

Apple, Google push for judicial oversight in Canada online safety bill

https://www.reuters.com/legal/litigation/apple-google-push-judicial-oversight-canada-online-safet...
1•Cider9986•16m ago•0 comments

Paxton Wins Texas Republican Primary After Trump Endorsement

https://www.reuters.com/world/us/cornyn-fights-political-life-against-trump-endorsed-paxton-texas...
3•Cider9986•17m ago•0 comments

Book the lakehouse – A beautiful OSS booking calendar for holiday homes

https://github.com/shrimbly/book-the-lakehouse
1•falloon•18m ago•0 comments

Mined in America Act Would Put Bitcoin Network at Risk

https://www.therage.co/mined-in-america-act-bitcoin-at-risk/
3•Cider9986•21m ago•0 comments

New Class of Gaming Systems (Hardware): Imagination Based Gaming [video]

https://www.youtube.com/shorts/TU0SFNk0hg0
1•AleBog•26m ago•1 comments

AV2 codec may be finalized on May 29

https://videocardz.com/newz/av2-codec-may-be-finalized-on-may-29
1•rguiscard•28m ago•0 comments

Effect of Vitamin D2 Supplementation on 25-Hydroxyvitamin D3 Status

https://academic.oup.com/nutritionreviews/advance-article/doi/10.1093/nutrit/nuaf166/8256613
1•bookofjoe•29m ago•0 comments

Webwright: A Terminal Is All You Need for Web Agents

https://www.microsoft.com/en-us/research/articles/webwright-a-terminal-is-all-you-need-for-web-ag...
1•carlual•31m ago•0 comments

Alberta Separatism

https://en.wikipedia.org/wiki/Alberta_separatism
1•lisper•32m ago•0 comments

"my battery is low and it's getting dark" – were never sent from Mars

https://spacedaily.com/b-the-opportunity-rovers-famous-last-words-my-battery-is-low-and-its-getti...
2•wglb•33m ago•0 comments

So, Where Does Next-Token Prediction Leave Us?

https://pop.rdi.sh/where-does-next-token-prediction-leave-us/
2•0x5FC3•36m ago•0 comments

Tunecat: Simple Internet Radio

https://codeberg.org/lindenii/tunecat/
3•croottree•39m ago•0 comments

Trump Administration to Send Americans Exposed to Ebola to Kenya

https://www.nytimes.com/2026/05/26/us/politics/trump-ebola-kenya.html
6•osnium123•40m ago•5 comments

Netherlands blocked US company from buying provider of Dutch digital identity

https://thenextweb.com/news/the-netherlands-just-blocked-a-us-company-from-buying-the-cloud-provi...
3•rguiscard•40m ago•1 comments

Aurora DSQL and the Circle of Life

https://marc-bowes.com/dsql-circle-of-life.html
1•croottree•41m ago•0 comments

Ian's Shoelace Site

https://www.fieggen.com/shoelace/index.htm
1•jmague•42m ago•2 comments

Add your vision and values for earth and see others'

https://wherearewegoing.earth
1•kevinshah•47m ago•0 comments

Show HN: Windows 8 inspired transfer speed graph

https://speed-transfer.arijs.org/
1•rhengles•56m ago•0 comments

Show HN: Hyper, the self driving company brain

https://heyhyper.ai/
1•shainvs•1h ago•0 comments

Kanban Bowl – A lightweight Kanban board inside VS Code

https://github.com/yannickboog/kanban-bowl
1•Schaefle•1h ago•0 comments

Stripe is friendly to "friendly fraud"

https://www.gingerlime.com/2026/stripe-seem-friendly-to-friendly-fraud/
54•gingerlime•1h ago•13 comments

Using SwiftUI to Build a Mac-Assed App in 2026

https://pfandrade.me/blog/mac-assed-swiftui-app/
1•birdculture•1h ago•0 comments

Notable Properties of Specific Numbers

http://www.mrob.com/pub/math/numbers-19.html
1•rolph•1h ago•0 comments

Erin Brockovich made a map to track data centers around the country

https://www.niemanlab.org/2026/05/erin-brockovich-made-a-map-to-track-data-centers-around-the-cou...
43•cratermoon•1h ago•26 comments

How to find Intel-based apps that might be triggering macOS warning popups

https://gist.github.com/kentbrew/a88c1fd0359417284192f80aaa706480
1•kentbrew•1h ago•0 comments

The Best Engineers Write Less Code

https://shvetsm.github.io/posts/the-best-engineers-write-less-code/
2•funnyenough•1h ago•3 comments

I ditched LM Studio for llama.cpp and my local LLM doesn't feel like a downgrade

https://www.xda-developers.com/ditched-lm-studio-for-llama-cpp-and-local-llm-doesnt-feel-like-dow...
1•makerdiety•1h ago•0 comments