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: Money Simulator

https://simulator.money/play
1•pattle•3m ago•0 comments

Show HN: Codeflowmap – map a codebase's read/write/auth data flows

https://github.com/man-consult/code-mapper
1•brian-m•4m ago•0 comments

Beyond the $7.4B Headline: DeepSeek's Series A signals Chinese AI alliance shift

https://asiaai.fyi/east-asias-ai-capital-surge-homegrown-models-challenge-west-amid-mineral-tensi...
1•dweisinger•5m ago•0 comments

LiveKit Solves Turn Detection

https://livekit.com/blog/solving-end-of-turn-detection
2•piyussh•6m ago•0 comments

Trump and Netanyahu Have Stepped in It Now

https://www.nytimes.com/2026/06/18/opinion/israel-america-iran-trump-vance.html
4•duxup•13m ago•1 comments

Typewriter Tinnitus/Morse Code Tinnitus

https://hearinglosshelp.com/blog/typewriter-tinnitus-morse-code-tinnitus/
2•austinallegro•18m ago•0 comments

Show HN: FERNme – agent memory that updates with ~zero LLM calls

https://github.com/mirkofr/FERNme
3•mirkofr•19m ago•0 comments

Giant Banana Pulled Over: Driver Says Cops Have Stopped Him 100s of Times

https://cowboystatedaily.com/2026/06/18/giant-banana-pulled-over-in-montana-driver-says-cops-have...
2•speckx•20m ago•1 comments

Show HN: HN Game Stories – mini-documentary of games that hit the front page

https://video.intellios.ai
2•coolwulf•21m ago•0 comments

Show HN: Submarius – Global water clarity for divers

https://submarius.com
3•celloer•23m ago•0 comments

Show HN: Starchart and Repo Header Generator

https://shieldcn.dev
4•justinlevine•24m ago•4 comments

Ask HN: What are some good benchmarks for different agent harnesses?

2•Bnjoroge•27m ago•0 comments

A Leaked GitHub Token Exposed the Exact Ozempic Formula

https://www.pentesty.co/blog/novo-nordisk-ozempic-fulcrumsec-breach-2026
4•johnzoro107•28m ago•1 comments

Ask HN: After you ship a feature, what happens to what you learned?

3•gaggle_dk•30m ago•1 comments

Show HN: Vitrus – the company brain that tells you what it doesn't know

https://github.com/ahmetvural79/Vitrus
2•ahvural•30m ago•0 comments

Hackingpal

https://github.com/hackingpal/hackingpal
2•jadamsl•34m ago•0 comments

Ask HN: What are your parameter count estimates for Opus 4.8 and GPT-5.5?

2•ahriad•36m ago•0 comments

Query with Curl

https://daniel.haxx.se/blog/2026/06/21/query-with-curl/
3•Sami_Lehtinen•36m ago•0 comments

Extracted Value

https://extractedvalue.com/
2•turtleyacht•41m ago•0 comments

Multi Pong – multiplayer pong game

https://multi-pong.projects.lasz.uk/
2•dr_kretyn•41m ago•0 comments

New V4 encryption format that supports hardware-bound encryption using Yubikeys

https://www.vaultsort.com/
4•VaultSort•43m ago•0 comments

Epoll vs. Io_uring in Linux

https://sibexi.co/posts/epoll-vs-io_uring/
19•Sibexico•46m ago•1 comments

The Tiny Sailing Game That Feels Surprisingly Real [video]

https://www.youtube.com/watch?v=30n_fdzgjJA
3•coolwulf•46m ago•0 comments

Russia's Putin is spending $26B to live forever

https://startupfortune.com/russias-putin-is-spending-26-billion-to-live-forever/
4•insanetech•47m ago•0 comments

First Pure-Go Cubrid Driver: Gocubrid

https://hexacluster.ai/blog/announcing-first-pure-go-cubrid-driver-gocubrid
2•avivallssa•49m ago•1 comments

South Korea Could Build Nuclear Submarines, but It Shouldn't

https://warontherocks.com/south-korea-could-build-nuclear-submarines-but-it-shouldnt/
2•bear_with_me•51m ago•1 comments

Show HN: Callimachus – Local search across your AI coding-agent history

https://github.com/BetaBots-LLC/callimachus
3•arishaller•52m ago•2 comments

Not just books: renting a sewing machine from the library can improve democracy

https://www.bbc.com/future/article/20260618-the-weird-and-wonderful-libraries-of-finland
37•sohkamyung•59m ago•13 comments

Jobflo – A local-first job tracker built with SwiftUI

https://lymegrove.com/jobflo/
2•jsrothwell•59m ago•0 comments

Adblock Plus doing just fine after updating to Manifest V3 two years ago

https://blog.adblockplus.org/blog/adblock-plus-doing-just-fine-after-updating-to-manifest-v3-two-...
3•twapi•1h ago•1 comments