frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•8mo 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•8mo 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•8mo 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).

Roman villa found under popular park dubbed town's 'Pompeii'

https://www.bbc.com/news/articles/cgk8j1gkxelo
1•defrost•5m ago•0 comments

Ask HN: Any active databases / systems paper reading group?

1•dockerd•8m ago•0 comments

AI in RollerCoaster Tycoon

https://labs.ramp.com/rct
1•robbiet480•15m ago•0 comments

Show HN: CKEditor 5 Symfony Integration

https://github.com/Mati365/ckeditor5-symfony
1•mati365•16m ago•0 comments

World Age for beginners: one way to compile a dynamic language

https://discourse.julialang.org/t/world-age-for-beginners-one-way-to-compile-a-dynamic-language/1...
1•anewhnaccount2•18m ago•0 comments

Show HN: 3D Visualizing YC Advice

https://github.com/akshay326/quote-viz
1•akshay326•19m ago•0 comments

Noise sensitivity disrupts the mind, brain and body

https://www.bbc.com/future/article/20250804-inside-the-brains-of-noise-sensitive-people
1•rock_artist•21m ago•0 comments

Your problem with Vim is that you don't grok vi.

https://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim
1•chanana•23m ago•0 comments

The Map Is Not the Territory: The Agent-Tool Trust Boundary

https://niyikiza.com/posts/map-territory/
2•niyikiza•36m ago•0 comments

If you want to plan your dev projects faster, use this tool

https://getfrostbyte.dev/
3•Skyfall106•43m ago•0 comments

Are the YouTube channel Courts and Crimes's shorts AI-generated deep fakes?

https://skeptics.stackexchange.com/questions/60423/are-the-youtube-channel-courts-crimess-shorts-...
2•razor-thin•48m ago•0 comments

Show HN: OpenAI FM – Zero-setup AI voice tool(Inspired by repo)

https://openai-fm.org/
2•thenextechtrade•52m ago•0 comments

Altaid 8800

https://sunrise-ev.com/8080.htm
2•exvi•52m ago•0 comments

Z80 Mem­ber­ship Card

https://sunrise-ev.com/z80.htm
3•exvi•52m ago•0 comments

Reverse Shell as a Service

https://github.com/lukechilds/reverse-shell
2•jayhoon•56m ago•0 comments

Bill Pearson's (Alien Supervising Model Maker) Portfolio, Projects and Showreel

https://www.bookofthedead.ws/bill_pearson/
2•exvi•57m ago•0 comments

BreachForums hacking forum database leaked, exposing 324,000 accounts

https://www.bleepingcomputer.com/news/security/breachforums-hacking-forum-database-leaked-exposin...
4•hentrep•59m ago•0 comments

Time without end: Physics and biology in an open universe-Freeman J. Dyson [pdf]

https://journals.aps.org/rmp/abstract/10.1103/RevModPhys.51.447
2•thunderbong•1h ago•0 comments

China-Australia relationship in 2026? This is how experts in China see it

https://theconversation.com/can-the-china-australia-relationship-stay-on-track-in-2026-this-is-ho...
3•defrost•1h ago•1 comments

Software Engineer Pay at McDonalds

https://www.levels.fyi/companies/mcdonalds/salaries/software-engineer
3•filetmignon•1h ago•0 comments

Pineapple Desktop (FreeDOS)

https://doscore.net/pineapple.html
3•kristopolous•1h ago•2 comments

Show HN: AgentWatch – A terminal dashboard for monitoring AI Agent costs

https://github.com/Tarunjit45/agentwatch
2•DarkX45•1h ago•0 comments

Harmonia – Hash function using Golden Ratio and Quasicrystal mathematics

https://github.com/faustodas-afk/harmonia-crypto
2•fadase•1h ago•1 comments

Found a rare moment when HN is restarting server

https://freeimage.host/i/screenshot-2026-01-12-112131.fvEKgee
2•celurian92•1h ago•0 comments

Show HN: Moving files without install on the host

https://uldl.sh
1•thedanielforum•1h ago•0 comments

Gh-Dash – GitHub PR Dashboard for Claude Code

https://github.com/jakozloski/claude-code-gh-dash
1•handfuloflight•1h ago•0 comments

Show HN: I kept forgetting Git worktree syntax, so I wrapped it

https://github.com/binbandit/workty
2•binbandit•1h ago•1 comments

Malaysia and Indonesia Block Elon Musk's Grok

https://www.cnbc.com/2026/01/12/malaysia-indonesia-block-elon-musks-grok-obscene-non-consensual-c...
3•rfarley04•1h ago•0 comments

The Workings of the Pentagon's UFO Reverse Engineering Program [video]

https://www.youtube.com/watch?v=u7g5Sn1DJF4
4•keepamovin•1h ago•0 comments

Semantic Rebase

https://www.peterjthomson.com/2026/01/semantic-rebase/
1•handfuloflight•1h ago•0 comments