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

Nazi Germany had no hope of making an atomic bomb, uranium cubes reveal

https://www.science.org/content/article/nazi-germany-had-no-hope-making-atomic-bomb-uranium-cubes...
1•xqcgrek2•2m ago•0 comments

Ask HN: Programming Codex/Claude to code for a duration

1•senor_digimon•2m ago•0 comments

Toronto hospital to expand permanent housing program that reduces ER visits

https://www.cbc.ca/news/canada/toronto/ont-dunn-house-9.7365728
1•BiraIgnacio•3m ago•0 comments

AI decompiling and combining Games: The Skate 3 in MW2 Mod is Unbelievable [video]

https://www.youtube.com/watch?v=I6BkcPdKQ8U
1•reimertz•4m ago•0 comments

Forget 'superintelligence': error-prone AI nearly sparked world war three

https://www.theguardian.com/commentisfree/2026/oct/01/forget-superintelligence-error-prone-ai-nea...
1•pseudolus•5m ago•0 comments

Praxis-1

https://runway.com/research/introducing-praxis-1
1•gmays•6m ago•0 comments

Bevy - a refreshingly simple data-driven game engine built in Rust

https://bevy.org/
1•reimertz•9m ago•0 comments

Our AI Midwife

https://www.astralcodexten.com/p/our-ai-midwife
1•semiquaver•10m ago•0 comments

Show HN: Sovereign-NB: Sub-microsecond bare-metal neural engine in Rust (UEFI)

https://github.com/msndsn123a/Sovereign-NB
1•msndsn123a•15m ago•0 comments

KernelBench: Can LLMs Write GPU Kernels? – Benchmark and Toolkit, Torch –> CUDA

https://github.com/ScalingIntelligence/KernelBench
1•peter_d_sherman•17m ago•0 comments

Martian Chaos Terrain

https://en.wikipedia.org/wiki/Martian_chaos_terrain
2•tiagod•20m ago•0 comments

Show HN: I made a bullet heaven game no one seems showing intresting

https://store.steampowered.com/app/5170580/Blend_Hunter_Smoothie_Bullet_Heaven/
1•sacravenger•20m ago•0 comments

Rate limits for private vulnerability reports

https://github.blog/changelog/2026-10-01-rate-limits-for-private-vulnerability-reports/
1•tech234a•22m ago•1 comments

Show HN: Agent team runtime with concrete lifecycle management

https://github.com/ringlochid/oh-my-subagents
1•ringlochid•23m ago•0 comments

Agentic coding's effect on Hacker News hiring threads

https://bsky.app/profile/largbae.bsky.social/post/3mwtqukfbcs23
1•largbae•25m ago•1 comments

HarnessTax: How Much Does the Harness Matter for Coding Agents?

https://arena.ai/blog/coding-agents-harness-tax
1•luispa•27m ago•0 comments

Show HN: QLCodePreview, syntax highlighting in Finder's Quick Look

https://konstruukt.com/projects/qlcodepreview/
1•realityloop•27m ago•1 comments

AI Benchmark Scores: Why 82% is actually 57%

https://lessuncertain.substack.com/p/how-to-read-and-haircut-ai-benchmark
1•luhe1900•28m ago•0 comments

Vaping for Crypto

https://www.nejm.org/doi/full/10.1056/NEJMp2606580?query=featured_home
1•maxall4•28m ago•0 comments

Reddit is ending RSS support on November 13

https://www.reddit.com/r/modnews/comments/1wubgvt/continuing_our_infrastructure_updates_whats/
7•soheilpro•29m ago•1 comments

100% free coding agent funded by ads

https://freebuff.com
1•darweenist•34m ago•0 comments

Merchants, Slaves, Peculium: The History of LLCs

https://www.kjmlaw.com/merchants-slaves-peculium-history-llcs/
1•gradus_ad•36m ago•0 comments

Intercommunalism

https://en.wikipedia.org/wiki/Intercommunalism
1•mooreds•36m ago•0 comments

Open-source, community-driven infrastructure for decentralized social media

https://github.com/blacksky-algorithms
2•mooreds•37m ago•0 comments

OVOS and Mycroft: A Fork That Wasn't Meant to Be

https://blog.openvoiceos.org
1•giancarlostoro•37m ago•0 comments

All Protection, All Month

https://mailchi.mp/vennfactory/oct-a-productivity
1•mooreds•37m ago•0 comments

Senate holds a hearing on AI [video]

https://www.youtube.com/watch?v=QYsfNRCj8H8
1•smalltorch•38m ago•0 comments

The Siren Call of Silicon Leviathan: Reflections on Blowup and Aufklärungsdämmer

https://arxiv.org/abs/2609.28591
1•hkhn•39m ago•0 comments

The essay on the Navier-Stokes story that everyone should read

https://siliconreckoner.substack.com/p/the-essay-on-the-navier-stokes-story
1•hkhn•41m ago•0 comments

Codex stopped working after latest update on macOS

https://twitter.com/theadriannoel/status/2105821027108343926
2•absqueued•43m ago•1 comments