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

The labour arbitrage theory of dev tool popularity

https://www.baldurbjarnason.com/2024/react-electron-llms-labour-arbitrage/
1•Teckla•59s ago•0 comments

Show HN: Free Email Verification Tool – no signup required

https://probe.uspeedo.online/
1•starryrbs•2m ago•0 comments

AI #178: A Fire Alarm for General Intelligence

https://thezvi.substack.com/p/ai-178-a-fire-alarm-for-general-intelligence
1•paulpauper•3m ago•0 comments

Should robots be considered as slaves?

https://www.optimallyirrational.com/p/should-robots-be-considered-as-slaves
1•paulpauper•4m ago•0 comments

Show HN: SMTP-probe – an open-source email deliverability diagnostic tool

https://github.com/monto-fe/smtp-probe
1•starryrbs•5m ago•0 comments

OpenBao Features – Declarative Configuration

https://openbao.org/blog/features-declarative-configuration/
1•cipherboy•9m ago•0 comments

Show HN: I poked at the golden ratio in SQL and solved an open math problem

https://blob.byteterrace.com/public/bds-theorem.html
1•kittoes•12m ago•0 comments

Show HN: Deep Skill Finder – Find agent skills using real execution benchmarks

https://www.meyo.life/skill
2•hannahLiang•16m ago•0 comments

How to Resolve Software Deployment Issues with SeaTicket

1•Daniel-Pan•17m ago•0 comments

Dismissing Europe as a museum is glib. Think of it as a theme park

https://www.economist.com/europe/2026/07/23/dismissing-europe-as-a-museum-is-glib-think-of-it-as-...
1•andsoitis•18m ago•0 comments

Pong Wars on the Commodore 64

https://imrannazar.com/articles/c64-pongwars
2•Teckla•20m ago•0 comments

The Full List of Trump's New Tariffs on 60 Economies

https://www.bloomberg.com/news/articles/2026-07-24/here-s-the-full-list-of-trump-s-new-tariffs-on...
1•alephnerd•20m ago•0 comments

The cost of GPUs goes far beyond AI data centers

https://www.theverge.com/cs/features/937356/ai-data-center-gpu-environmental-impact
3•acmnrs•22m ago•0 comments

Open Source Tax Engine outperforming GPT sol and Fable 5

https://opentax.invaro.ai/
2•asmigulati•25m ago•0 comments

Harness Handbook – Making Agent Harnesses Understandable, Auditable and Editable

https://ruhan-wang.github.io/Harness-Handbook/
2•gmays•31m ago•0 comments

RubyGems advisory: Possible leak of legacy API keys via improper cache config

https://blog.rubygems.org/2026/07/22/security-advisory-legacy-api-key-leak.html
2•forks•32m ago•1 comments

2026 western US snow drought was about 4x more likely due to climate change

https://www.pnas.org/doi/full/10.1073/pnas.2612961123
3•littlexsparkee•36m ago•2 comments

Which Odyssey translation wins a blind reading test?

https://homer.scrivium.com/report/
2•curo•38m ago•0 comments

WorkBuddy Bench: Agentic Coding Leaderboard

https://workbuddybench.com/index.html
1•ilreb•39m ago•0 comments

The Corporate Creep of Plex: Why it may be time to move to Jellyfin

https://reprodev.com/the-corporate-creep-of-plex-why-it-may-be-time-to-move-to-jellyfin-and-the-o...
2•reprodev•39m ago•0 comments

Slow Exhale

https://dgmor.itch.io/slow-exhale
1•skhr0680•40m ago•0 comments

Asthma Control Before and After Changing Gas Stoves to Electric Stoves

https://www.sciencedirect.com/science/article/pii/S2213219826005374
3•tchalla•43m ago•0 comments

Vanishing archaeological landscapes in Mesopotamia:CORONA imagery site detection

https://arxiv.org/abs/2507.13420
2•Jimmc414•48m ago•0 comments

Microsoft 365 outage affects Teams, SharePoint and other services

https://www.bleepingcomputer.com/news/microsoft/microsoft-365-outage-affects-teams-sharepoint-and...
3•Khaine•49m ago•1 comments

Deep in a Vermont Lake, a Contagious Cancer Is Spreading

https://www.nytimes.com/2026/07/22/science/contagious-cancer-catfish.html
1•eigenhombre•49m ago•0 comments

Automated sign detection across the Electronic Babylonian Library

https://arxiv.org/abs/2606.22608
2•Jimmc414•51m ago•0 comments

Police Removed Prominent Scientists from the ADA Meeting. Researchers Respond

https://www.the-scientist.com/police-removed-prominent-scientists-from-the-ada-meeting-researcher...
18•fosco•51m ago•4 comments

When Abraham Lincoln Fought a Duel:The Astonishing Saber Duel of Abraham Lincoln [video]

https://www.youtube.com/watch?v=9nSCZCtGpQs
1•fortran77•51m ago•0 comments

Minimalist Film

https://en.wikipedia.org/wiki/Minimalist_film
2•hopelessluca•52m ago•0 comments

Echo Chamber: how bubbles form, and how to break them

https://echo.logicaleap.com/?e=1.4&a=0&rho=0.1&h=0.8&n=150&od=6&seed=42&topo=ba&b=0&k=8&t=random&...
1•gmays•55m ago•0 comments