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

Show HN: Autograd-Free LLM Guiding with 0MB VRAM (Alternative Pathways)

https://github.com/PJHkorea/Continuous_Wave_Field_LLM_Brain
1•PJHkorea•1m ago•0 comments

Obliterate, Don't Automate

https://blog.usv.com/obliterate
1•wslh•1m ago•0 comments

From knowledge-based inference to presence-based verification

https://discuss.huggingface.co/t/if-unsure-ask-never-guess-ai-agent-pre-execution-checklist/176632
1•offaxis•2m ago•0 comments

Show HN: Focus on approving agent actions and managing team MCP access

https://gettrustloop.app
1•ducnguyen67201•2m ago•0 comments

Alphabet Quadruples Profit to Nearly $120B, Fueled by A.I. Investments

https://www.nytimes.com/2026/07/22/technology/alphabet-google-earnings-profit.html
1•xnx•5m ago•1 comments

Safari Technology Preview 248 Released

https://webkit.org/blog/18162/release-notes-for-safari-technology-preview-248/
2•Erenay09•5m ago•0 comments

Show HN: LiquidBrain – Unlimited Tokens. Unlimited Context. One Fixed Price

https://liquidbrain.ai/
1•salsta1•6m ago•0 comments

Daniel Radcliffe to Narrate Comedian Kyle Gordon's Third Album

https://variety.com/2026/music/news/daniel-radcliffe-narrate-kyle-gordon-album-1236812133/
1•firasd•8m ago•0 comments

We verify Cleric's production fixes

https://cleric.ai/blog/verifying-fixes
1•willempienaar•11m ago•0 comments

Character.ai: The Technical Story of What Keeps Users Hooked

https://manish.sh/writings/ai-tools/inside-character-ai-the-technical-story-of-what-keeps-users-h...
1•ms7892•11m ago•0 comments

Framework downgrades RAM configurations on pre-orders due to price hikes

https://old.reddit.com/r/framework/comments/1v3ntus/framework_memory_configurations_updated/
1•john-titor•11m ago•1 comments

Flare Redact – zero-dependency secret and PII redaction for Node.js

https://github.com/umudhasanli/flare-redact
1•umudhasanli•12m ago•0 comments

Show HN: The Daily FM – Turn any source into a daily podcast

https://thedaily.fm/
2•carimura•15m ago•1 comments

How Philly took a starring role in the 1983 holiday comedy 'Trading Places'

https://www.phillyvoice.com/trading-places-philadelphia-production-christmas-holiday-movies/
2•austinallegro•17m ago•1 comments

MG risks their cars becoming a rolling pirate copy

https://table.media/en/china/talk-of-the-town/software-licenses-mg-risks-becoming-a-rolling-pirat...
1•fh973•18m ago•1 comments

Why 'narcissistic' bosses don't want you working from home

https://www.rte.ie/brainstorm/2026/0722/1584510-narcissistic-self-centred-bosses-working-from-hom...
1•austinallegro•21m ago•2 comments

ICFP Programming Contest 2026

https://icfpcontest2026.com/
2•matt_d•21m ago•0 comments

On Strings in Rust

https://mfroeh.github.io/2026/07/on-strings-in-rust/
1•mfroeh•22m ago•0 comments

ISPs' long nightmare of having to list all the fees they charge is finally over

https://arstechnica.com/tech-policy/2026/07/isps-long-nightmare-of-having-to-list-all-the-fees-th...
3•ndr42•22m ago•0 comments

The 4-Hour-Work-Week is over

https://www.joanwestenberg.com/p/the-4-hour-work-week-is-over
2•spking•23m ago•1 comments

Show HN: SlapMetrics – Mac menu bar app that monitors Stripe/GA4 metrics

https://www.slapmetrics.com
1•devtanna•23m ago•0 comments

State Champs

https://seths.blog/2026/07/state-champs/
2•speckx•28m ago•0 comments

I Inspected My Take-Home Interview Project. It Was a Whole Operation

https://citizendot.github.io/articles/fake-job-interview-git-hook-malware/
9•CITIZENDOT•32m ago•0 comments

Show HN: ClawLite – Local-first personal AI assistant on Telegram

https://github.com/forgesynapseltd/ClawLite
1•ForgeSynapse•32m ago•0 comments

DOJ Now Citing Fake AI-Generated Cases to Keep ICE Detainees Locked Up

https://www.techdirt.com/2026/07/22/doj-now-citing-fake-ai-generated-cases-to-keep-ice-detainees-...
3•hn_acker•32m ago•0 comments

Geometrizing multivariate algebra to reduce complexity from O(e^n) to O(n)

https://zenodo.org/records/21499484
1•LeonardoYMG•38m ago•0 comments

Show HN: Netmon – self-hosted LAN monitor with sarcastic AI reports to Telegram

https://github.com/Role1776/netmon
1•OymInIRole•39m ago•0 comments

ChatGPT Led to a Man's Near-Fatal Health Crisis, Lawsuit Claims

https://www.nytimes.com/2026/07/22/well/openai-chatgpt-health-lawsuit.html
4•VinayUPrabhu•40m ago•0 comments

Ask HN: What changed in your life when you started meditating (and how)?

6•dondraper36•41m ago•2 comments

To Have Taste You Must Eat (and Software Engineering) – Video

https://www.youtube.com/watch?v=F4igbiu9eR8
2•SamCoding•42m ago•0 comments