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

1•hermawan22•25s ago

Ubuntu now has official desktop images for RISC-V

https://www.omgubuntu.co.uk/2026/10/ubuntu-desktop-riscv-iso
1•fork-bomber•4m ago•0 comments

ZJIT is now as fast as YJIT

https://railsatscale.com/2026-10-09-zjit-is-now-as-fast-as-yjit/
1•riffraff•5m ago•0 comments

When I type "hi" into Claude Code, what happens?

https://the-agent-stack.com/
1•theahura•5m ago•0 comments

Maritime: Persistent Cloud Agents

https://maritime.sh
1•handfuloflight•7m ago•0 comments

Show HN: Crosstune – Open any music link in your favorite app

https://crosstune.4st.li/
1•astrolince•12m ago•0 comments

If AI keeps evolving,would you worry about your next generation's survival

1•hanstyle•12m ago•0 comments

The U.S. Nuclear Plant Fleet Is Leaning into AI

https://spectrum.ieee.org/ai-assistants-nuclear-power-plant
1•geox•14m ago•0 comments

AI Writing Labels – Sloppate liberius, sloppate recte

https://aialabels.com/
1•lateharvest•15m ago•1 comments

AI companies plot "day after" scenarios for public revolt

https://www.axios.com/2026/10/09/ai-companies-day-after-major-attack
1•thm•16m ago•1 comments

Universal Paperclips

https://www.decisionproblem.com/paperclips/
1•xeonmc•17m ago•0 comments

The 'American Dream' Now Costs More Than $5.3M

https://www.investopedia.com/the-2026-american-dream-cost-rises-4-percent-12154346
2•gscott•23m ago•0 comments

Food processing influences metabolism and brain activity

https://news.vt.edu/articles/2026/10/research_fralinbiomed_upfhutelin.html
1•gmays•23m ago•0 comments

Need Unbiased and Real Assessment

1•donovanfromla•25m ago•1 comments

Show HN: Rutter – shared decision memory across AI tools

https://ruttermemory.com/
1•shinytoyrobots•27m ago•0 comments

Kefermarkt Chruch – Gaussian Splatting

https://www.youtube.com/watch?v=nC6Q2wN-vfM
1•cavoirom•28m ago•0 comments

Show HN: Iimos – an AI app that ships as one chat box and rewrites itself

https://github.com/yanglongyun/iimos
1•woodchange•29m ago•0 comments

Explore the New Shenzhen Natural History Museum

https://www.wallpaper.com/architecture/shenzhen-natural-history-museum-3xn-china
1•inshard•36m ago•0 comments

Greece Is a Near Eastern Country: Foreword to the New Byzantines

https://nntaleb.medium.com/foreword-to-sean-mathews-the-new-byzantines-541ba9cebfe3
1•endorphine•39m ago•0 comments

Show HN: Starguessr – GeoGuessr for the Night Sky

https://starguessr.sidequests.space/
1•Sketchy_•43m ago•0 comments

Show HN: MCP to measure human arm in Blender

https://github.com/hpdkhoa/poselab-mcp
1•khoahpd•50m ago•0 comments

If AI is conscient, then we are making slaves

https://www.groundlevel-ai.com/p/anthropic-ai-consciousness-new-york-times-rabbi
10•mathieu_aithos•54m ago•12 comments

What do MTEB scores mean, and how should you choose an embedding model?

https://thottingal.in/blog/2026/10/09/mteb-scores/
2•sthottingal•1h ago•0 comments

Zombie AI Video Generator – a zombie love story from two photos

https://zombieaivideo.org/
2•chaojie26•1h ago•0 comments

Lobbying

https://geohot.github.io//blog/jekyll/update/2026/10/10/lobbying.html
141•smilelamp•1h ago•42 comments

Software's centaur age may last decades

https://www.seangoedecke.com/softwares-centaur-age-may-last-decades/
7•srijan4•1h ago•2 comments

Oracle, Broadcom and SpaceX Seek Blockbuster Debt Deals to Pay for AI Chips

https://www.wsj.com/tech/oracle-broadcom-and-spacex-seek-blockbuster-debt-deals-to-pay-for-ai-chi...
2•gmays•1h ago•0 comments

Show HN: A simple to-do app for iPhone, Mac, and your agent

https://ilia.page/writing/introducing-nagare
2•shmilia•1h ago•1 comments

Webcmd (by AgentR) is open-source Released on October 8/9, 2026

https://markets.businessinsider.com/news/stocks/agentr-launches-webcmd-open-source-browser-infras...
2•noobplus•1h ago•0 comments

Most anxious generation ever? WHO data says 470M people have anxiety

https://www.hindustantimes.com/lifestyle/health/most-anxious-generation-ever-who-data-says-470-mi...
2•rustoo•1h ago•0 comments