frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Something Big Happened in 1998

https://openpath.quest/2025/something-big-happened-in-1998/
1•Tomte•2m ago•0 comments

AI Bathroom Monitors? Welcome to America's New Surveillance High Schools

https://www.forbes.com/sites/thomasbrewster/2025/12/16/ai-bathroom-monitors-welcome-to-americas-n...
1•harambae•12m ago•0 comments

Understanding Conversational AI: Philosophy, Ethics, and Social Impact of LLMs

https://www.ubiquitypress.com/books/m/10.5334/bde
1•spidersouris•12m ago•0 comments

The night everything at DCA went wrong

https://theaircurrent.com/aviation-safety/dca-crash-jan-29-special-report/
1•worik•13m ago•0 comments

Show HN: ZDS – Zig Data Structures

https://github.com/asheshvidyut/zds
1•absolute7•16m ago•0 comments

Debian adds LoongArch as officially supported architecture

https://lists.debian.org/debian-devel-announce/2025/12/msg00004.html
3•cbmuser•19m ago•0 comments

NTP at NIST Boulder Has Lost Power

https://lists.nanog.org/archives/list/nanog@lists.nanog.org/message/ACADD3NKOG2QRWZ56OSNNG7UIEKKT...
2•lpage•28m ago•0 comments

The Polyglot NixOS

https://x86.lol/generic/2025/12/19/polyglot.html
1•todsacerdoti•28m ago•0 comments

Contrails Map

https://map.contrails.org/
2•schaum•28m ago•0 comments

Roblox–Schlep Controversy

https://en.wikipedia.org/wiki/Roblox_Corporation
1•anileated•30m ago•0 comments

Show HN: I made an AI agent to interact with resume and make changes as you ask

https://resumeup.ai
1•rohithreddyj•38m ago•0 comments

My thoughts on Y Combinator [video]

https://www.youtube.com/watch?v=L7x2ufU1c9Y
1•seagram•44m ago•0 comments

Show HN: Amida-san – Participatory lottery where everyone draws the lines

https://amida-san.com/
1•hello_sh•45m ago•0 comments

⌘-Arrow Hotkey Navigation in Claude Code and Codex

https://banagale.com/%e2%8c%98%e2%86%90-and-%e2%8c%98%e2%86%92-hotkey-navigation-in-claude-code-a...
1•bredren•46m ago•0 comments

We asked four AI coding agents to rebuild Minesweeper–the results were explosive

https://arstechnica.com/ai/2025/12/the-ars-technica-ai-coding-agent-test-minesweeper-edition/
3•canucker2016•47m ago•1 comments

Tiny Tapeout 8 demo competition entries

https://www.a1k0n.net/2025/12/19/tiny-tapeout-demo.html
1•robin_reala•52m ago•0 comments

Perfect Software – Software for an Audience of One

https://outofdesk.netlify.app/blog/perfect-software
2•ggauravr•52m ago•0 comments

People Watched 700M Hours of YouTube Podcasts on TV in October

https://www.bloomberg.com/news/articles/2025-12-18/people-watched-700-million-hours-of-youtube-po...
1•solalf•55m ago•1 comments

Show HN: HiFidelity – A native macOS offline audiophile music player

https://rvarunrathod.github.io/HiFidelity/
1•rathod0045•56m ago•0 comments

Business SLOs

https://medium.com/@haagwee/business-slos-4992d7435ff9
1•todsacerdoti•1h ago•0 comments

The offline geocoder we wanted

1•gipsyjaeger•1h ago•1 comments

Mole – deep clean and optimize your Mac

https://github.com/tw93/Mole
2•microflash•1h ago•0 comments

Show HN: Hat – An Automatic Image Compressor

https://github.com/bittere/hat
1•_bittere•1h ago•0 comments

Show HN: One Thing at a Time Please – A Kanban board with one ticket slot

https://onethingatatimeplease.com/
2•agsilvio•1h ago•0 comments

OpenCyc 4.0

https://sourceforge.net/projects/opencyc/
1•swatson741•1h ago•0 comments

LG forced a Copilot web app onto its TVs but will let you delete it

https://www.theverge.com/news/847685/lg-copilot-web-app-delete
3•breve•1h ago•0 comments

What Sam Altman Doesn't Want You to Know [video]

https://www.youtube.com/watch?v=l0K4XPu3Qhg
3•SLHamlet•1h ago•2 comments

Cloudflare has been broken for 15 hours

4•Canada•1h ago•6 comments

Ask HN: How do you deal with marketing?

1•zata•1h ago•1 comments

Privacy doesn't mean anything anymore, anonymity does

https://servury.com/blog/privacy-is-marketing-anonymity-is-architecture/
23•ybceo•1h ago•9 comments