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

Fix pathological performance in trait solver

https://github.com/rust-lang/rust/pull/155355
1•Jyaif•2m ago•0 comments

Pinote – A lightweight floating Markdown scratchpad app

https://github.com/ImFeH2/pinote
1•indigodaddy•3m ago•0 comments

I built a machine that can make you rich with math [video]

https://www.youtube.com/watch?v=2UM4j1_xEs0
1•tzvc•4m ago•0 comments

Senior NIAID Official Indicted for Concealing Records During Covid Pandemic

https://www.justice.gov/opa/pr/former-senior-niaid-official-indicted-concealing-federal-records-d...
2•Jimmc414•6m ago•1 comments

YC startup Luel appears to have copied Kled

https://twitter.com/avipat_/status/2055384102409253056
2•tjek•9m ago•1 comments

Show HN: Nexa-Gauge – LLM eval framework, now with self-hosted model support

https://github.com/harnexa/nexa-gauge
1•Sardhendu•10m ago•0 comments

Ask HN: What Happened to ssh-audit.com?

1•Bender•11m ago•0 comments

Show HN: Plan-Graph based code generation with LLMs

https://github.com/agrin96/VibegraphGenerator
1•ag_rin•15m ago•0 comments

Kinetic typography: the what, why, and how

https://www.linearity.io/blog/kinetic-typography/
1•argee•22m ago•0 comments

Symposia AI

https://www.trysymposiaai.com/landing
1•CarlosEdu•23m ago•1 comments

Solving CartPole in 8 Weights

https://cartpole.neocities.org/
3•georgehotz•24m ago•0 comments

Magical Realism: "Northern Exposure" 25 Years Later (2015)

https://www.rogerebert.com/streaming/magical-realism-nothern-exposure-25-years-later
1•walterbell•24m ago•0 comments

Show HN: Wyndup – share a live countdown with your podcast guest

https://wyndup.net
1•ardwino•29m ago•0 comments

Elastic Cloud on Kubernetes, simplified: zone awareness, restarts, and mTLS

https://www.elastic.co/search-labs/blog/elasticsearch-kubernetes-zone-awareness-restarts-mtls
1•eigenBasis•29m ago•0 comments

Jane Street's approach to AI adoption throughout their SDLC [video]

https://www.youtube.com/watch?v=rUYP4C29yCw
2•devdoshi•31m ago•1 comments

Brovan: Binary user-mode emulator for x86_64

https://github.com/AdvDebug/Brovan
1•AdvDebugy•32m ago•0 comments

WikiProject Editor Retention

https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Editor_Retention
1•sshh12•33m ago•1 comments

A Compression Tool for LLM Reads. Est. 60-95% Fewer Tokens

https://github.com/chopratejas/headroom
1•botacode•34m ago•0 comments

North America's largest commuter rail system faces a potential shutdown

https://apnews.com/article/lirr-new-york-commuter-rail-strike-union-eefab0d1f91470934fb89bd1809d0a94
3•petethomas•36m ago•3 comments

Random.website

https://random.website
2•npilk•36m ago•0 comments

Humanoid robots won't surprise us when they arrive

https://philipotoole.com/humanoid-robots-wont-surprise-us-when-they-appear/
2•otoolep•41m ago•0 comments

Thorchain halts trading after $10M cross-chain exploitRUNE token drops 12%

https://www.coindesk.com/tech/2026/05/15/thorchain-halts-trading-after-usd10-million-cross-chain-...
1•LUZUVYY•45m ago•0 comments

Engineer creates starwars inspired air bike

https://volonaut.com
1•nirkalimi•46m ago•0 comments

How to bypass Anti-Bots in 2026

https://roundproxies.com/blog/how-to-bypass-anti-bots/
2•majorchord•47m ago•0 comments

Python by Example Using Cloudflare Dynamic Workers

https://www.pythonbyexample.dev/
2•adewale•48m ago•1 comments

Lost in Translation: Text Message Spoofing via Email [pdf]

https://sumanthvrao.github.io/papers/rao-oakland-2026.pdf
3•yechs•48m ago•1 comments

New quantum algorithm solves "impossible" materials problem in seconds

https://www.sciencedaily.com/releases/2026/05/260512202355.htm
3•maxloh•49m ago•1 comments

What Is Rails-Way?

https://paweldabrowski.com/farewell-to-rails-way/what-is-rails-way
3•thunderbong•51m ago•0 comments

SpaceX targets June 11 IPO pricing, picks Nasdaq for historic market debut

https://www.coindesk.com/markets/2026/05/15/spacex-targets-june-11-ipo-pricing-picks-nasdaq-for-h...
2•LUZUVYY•52m ago•0 comments

Auto Rebaser v2 – browser-side GitHub PR housekeeping, now multi-account

https://github.com/bradygrapentine/auto-rebaser
2•bgrapentine•56m ago•0 comments