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

The first Vera Rubin NVL72 server rack

https://twitter.com/i/status/2061118201636036668
2•mudil•15m ago•0 comments

Marcus Aurelius Had Anxiety Too – Stoicism for People Who Overthink

https://stvrrll1ght.substack.com/p/marcus-aurelius-had-anxiety-too-stoicism
1•maheenahmed•18m ago•0 comments

In UFO Files, Some Christians See Vexing Questions – and Demons

https://www.nytimes.com/2026/05/31/us/ufo-files-pentagon.html
1•ryan_j_naughton•19m ago•0 comments

Can I find the exact number of users in FusionAuth with specific attributes?

https://fusionauth.io/community/forum/topic/3132/how-can-i-get-an-exact-number-of-users-with-some...
1•mooreds•19m ago•0 comments

Ask HN: How do you solve AI's confused deputy problem?

1•david_shi•20m ago•0 comments

xAI touts 10x performance gain while Ceramic has achieved 80 MFU

https://www.ceramic.ai/blog/ai-training-stack-performance-how-ceramic-achieved
3•densone•22m ago•0 comments

The Totalisator

https://computer.rip/2026-05-31-totalisator.html
1•pinewurst•23m ago•0 comments

Peter Thiel warns AI is threat to technical roles more than to creative thinkers

https://fortune.com/article/peter-thiel-ai-skills-creative-thinking-technical/
3•1vuio0pswjnm7•33m ago•0 comments

Nearly one-third of automotive loan terms are longer than six years

https://www.businesswire.com/news/home/20260528635242/en/
2•mattas•38m ago•0 comments

Instagram exploit allows you to use Meta AI to reset passwords to accounts

https://xcancel.com/DarkWebInformer/status/2061253599758315527
3•Cider9986•39m ago•0 comments

Show HN: Find your birth date song that was number-one

https://github.com/skorotkiewicz/tbs
1•modinfo•42m ago•0 comments

The Grand Unified Model of DevOps/SRE Dynamics

https://sigbovik.org/2026/proceedings.pdf#page=897
2•ycombiredd•43m ago•2 comments

Weekend trivia: your process' memory is a file

https://lcamtuf.substack.com/p/weekend-trivia-your-process-memory
2•surprisetalk•45m ago•0 comments

Wasp Colonies Explode into Violence After Losing Their Queen

https://scitechdaily.com/wasp-colonies-explode-into-violence-after-losing-their-queen/
1•Gaishan•49m ago•0 comments

Show HN: Ralphy – open-source autonomous Claude Codd built on the Ralph loop

https://github.com/Mizerness/Ralphy
1•miserness•53m ago•0 comments

Nvidia GTC Taipei 2026 Keynote [video]

https://www.youtube.com/watch?v=wSp6AiNIrsY
3•lrae•53m ago•0 comments

Codex app plugin integration can be better?

https://github.com/obra/superpowers
1•xiaoluolyg•57m ago•0 comments

Memoir TV

https://pages.cloudflare.com/
1•classic_films•1h ago•0 comments

Specialized Claude Code Agents for Unreal Engine 5

https://github.com/damien220/UnrealEngine_Agent
1•Damien_220•1h ago•0 comments

Croft: VSCode-style TUI written in Rust

https://codeberg.org/vitali87/croft
3•vitali87•1h ago•0 comments

Long read: Bluey deal FOMO will kill the next Bluey

https://oblongataresearch.substack.com/p/bluey-deal-fomo-will-kill-the-next
6•basiljh•1h ago•0 comments

A CS student's job hunt in 2026: an honest playbook

https://medium.com/@sjonany/a-cs-students-job-hunt-in-2026-an-honest-playbook-5a57b41bf7fb
2•eigenBasis•1h ago•0 comments

A bot to automatically update and merge GitHub PRs

https://github.com/chdsbd/kodiak
1•mooreds•1h ago•0 comments

Git-spice is a tool for stacking Git branches

https://abhinav.github.io/git-spice/
1•mooreds•1h ago•0 comments

A Shield or a Cudgel?

https://blacksheepcode.com/posts/a_shield_or_a_cudgel
1•davidbsc•1h ago•0 comments

How flat is replacing fat in AWS data center networks

https://www.amazon.science/blog/how-flat-is-replacing-fat-in-aws-data-center-networks
1•mooreds•1h ago•0 comments

How to Call an API from an Email

https://redo.com/eng-blog/how-to-call-an-api-from-an-email/
1•thunderbong•1h ago•0 comments

Why Local Minima Are Rare in High-Dimensional Landscapes

https://www.grantstenger.com/local-minima
2•brandonb•1h ago•0 comments

Instagram account takeover exploit via support chatbot prompt injection (fixed)

https://twitter.com/weezerOSINT/status/2061223556994965643
1•yogorenapan•1h ago•0 comments

The Book That Started It All [video]

https://www.youtube.com/watch?v=vBwaWRZyIBM
1•asim95•1h ago•0 comments