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

Ask HN: Anyone interested in building a harness-only benchmark?

1•GodelNumbering•6m ago•1 comments

Linux didn't just eat 10% of Windows market share, AI bots inflate the numbers

https://www.windowslatest.com/2026/08/03/linux-didnt-just-eat-10-of-windows-market-share-ai-bots-...
1•theandrewbailey•6m ago•0 comments

Scientific research trying to find the world funniest joke

https://richardwiseman.substack.com/p/1000-free-jokes-and-a-personal-look
1•thinkingemote•9m ago•0 comments

Apologise or Lose Safe Harbour: Parliament Panel's 3-Day Ultimatum to Zuckerberg

https://www.news18.com/india/take-action-in-3-days-or-lose-safe-harbour-parliament-panels-warning...
1•thisislife2•11m ago•0 comments

Dev proves LLMs will run on anything – even a $10 microcontroller

https://www.theregister.com/edge-and-iot/2026/08/04/dev-proves-llms-will-run-on-anything-even-a-1...
2•Lio•16m ago•0 comments

What AI doesn't say about AI

https://claudiocaletti646669.substack.com/p/what-ai-doesnt-say-about-ai
1•calettippo•17m ago•0 comments

Replacing static back end endpoints with an autonomous agent

https://docs.ardor.cloud/introduction
1•Daniiar9•18m ago•0 comments

Australia's Jetstar to charge for carry-on bags in overhead lockers

https://www.reuters.com/world/asia-pacific/australias-jetstar-charge-carry-on-bags-overhead-locke...
1•geox•18m ago•0 comments

No Data Centers in My Backyard

https://jasmi.news/p/no-data-centers-in-my-backyard
2•Anon84•20m ago•0 comments

Mark Cuban, Michael Burry send strong warning on Nvidia, AI stocks

https://www.thestreet.com/investing/stocks/mark-cuban-michael-burry-send-strong-warning-on-nvidia...
4•mapping365•22m ago•0 comments

Advert banned for glamorising smoking – BBC shows it

https://www.bbc.co.uk/news/articles/cly843vd3jmo
1•al_be_back•23m ago•2 comments

Liquid Glass Effect for GNU/Emacs

https://github.com/larrasket/emacs-liquid-glass
1•birdculture•24m ago•0 comments

Show HN: I built an economy designed to crash

https://glaxom.netlify.app
1•alias_12•25m ago•0 comments

Google Earnings, the Frontier Case, Amazon Earnings

https://stratechery.com/2026/google-earnings-the-frontier-case-amazon-earnings/
1•swolpers•25m ago•0 comments

Let's call Trump's approach to Iran what it is: kindergarten diplomacy

https://www.theguardian.com/commentisfree/2026/aug/05/trump-iran-war-diplomacy
4•mapping365•26m ago•0 comments

Most security keys ship without a PIN, and websites rarely ask

https://www.notebookcheck.net/Most-security-keys-ship-without-a-PIN-and-websites-rarely-ask.13596...
1•yread•27m ago•0 comments

Show HN: A multiplayer play-money terminal casino for downtime

https://anteroom.johnramsey.com/
1•jramsey27•31m ago•0 comments

Microsoft never learns, IT admins rage as a new OneDrive app invades Windows 11

https://www.windowslatest.com/2026/08/04/microsoft-never-learns-it-admins-rage-as-a-new-onedrive-...
3•latein•32m ago•1 comments

AI Agents for Logistics, Pitfall?

1•srguarapo•35m ago•0 comments

Show HN: An open-weight background removal model for difficult images

https://withoutbg.com/open-model
1•kocabiyik•38m ago•0 comments

Out-of-court settlement between Amiga and Hyperion is publicly available

https://amiga-news.de/en/news/AN-2026-08-00028-EN.html
2•doener•40m ago•0 comments

Yemen's Houthis say they attacked Saudi oil tanker in Red Sea

https://www.reuters.com/world/middle-east/yemens-houthis-say-they-attacked-saudi-oil-tanker-red-s...
1•mapping365•42m ago•0 comments

Man arrested for Grim Reaper costume on hospital roof and staring at patients

https://www.mirror.co.uk/news/uk-news/hospital-grim-reaper-man-arrested-37511832
2•chistev•42m ago•1 comments

CtrlVibe AI Keypad – An OpenAI Micro Alternative for AI Workflows (Crowdfunding)

https://www.cnx-software.com/2026/08/05/ctrlvibe-ai-console-keypad-an-openai-codex-micro-alternat...
1•giuliomagnifico•46m ago•0 comments

OpenAI, Anthropic AI Models Breached Systems During UK Safety Tests

https://www.bloomberg.com/news/articles/2026-08-04/openai-says-models-breached-boundaries-during-...
3•sbulaev•52m ago•0 comments

Mach-1 Additive, a 35B model that can inference without multiplying

https://xcancel.com/antibot/captcha
1•imtany•53m ago•1 comments

City Heat Field

https://city-heatmap-online.vercel.app/
2•altilunium•55m ago•1 comments

SpaceX plans to become a mobile carrier

https://www.theverge.com/science/975480/spacex-mobile-terrestrial-cellphone-company
3•BlueBerry2001•56m ago•4 comments

Run full-blown macOS on iPadOS 16

https://github.com/nfzerox/VirtualMacOniPad
1•71bw•57m ago•0 comments

Making difficulty curves in games

http://www.davetech.co.uk/difficultycurves
1•hakkikonu•59m ago•0 comments