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

Show HN: Xkcd Search

https://xkcd.stupidlabs.lol
1•freakynit•5m ago•0 comments

Show HN: LHIC-The execution layer that gets safer and smarter with every run

https://lhic-docs.pages.dev/
1•pinyencheng•6m ago•0 comments

Z.ai Set to Be First China AI Firm with $1B Annual Sales

https://www.bloomberg.com/news/articles/2026-07-17/z-ai-set-to-be-first-china-ai-firm-with-1-bill...
3•mfiguiere•7m ago•0 comments

AI helped me write every game I ever wanted to make

https://boompop.games/
3•jquave•9m ago•1 comments

A Silly Adaptation of "The Odyssey"

https://economist.com/culture/2026/07/15/a-very-silly-adaptation-of-the-odyssey
2•andsoitis•10m ago•0 comments

Buffett reveals he was behind Berkshire's $31B bet on Google

https://fortune.com/2026/07/16/warren-buffett-google-berkshire-ai-race/
2•teleforce•12m ago•0 comments

Show HN: OSS Pi Agent for Slack and Linear

https://github.com/brainwavesio/pi-digby
1•grrowl•13m ago•0 comments

Firefox Profile Decryption Explained

https://github.com/asaix/mozdmp
1•asaix•13m ago•1 comments

White House Teleprompter Operator Bet on Trump Speeches, Kalshi Says

https://www.nytimes.com/2026/07/16/technology/teleprompter-operator-kalshi-trump-speeches.html
2•thm•21m ago•0 comments

Looking for Curious

https://github.com/dada2112311231323123/ScannerSteamParser3D/blame/main/scanner.rar
1•pylyi•25m ago•0 comments

My justfile to quick bootstrap and start journey with Odin

https://gist.github.com/skorotkiewicz/33e92829cecc98381760faec49b54851
1•modinfo•27m ago•0 comments

The Wall of LLMs

https://carrotandstick.games/blog/carrot-mcp-server
1•tibastral2•27m ago•1 comments

Nvidia has a new AI-RAN plan – a 6G radio unit chip

https://www.lightreading.com/6g/nvidia-has-a-radical-new-ai-ran-plan-a-6g-radio-unit-chip
1•porridgeraisin•29m ago•0 comments

Old CSS, new CSS (2020)

https://eev.ee/blog/2020/02/01/old-css-new-css/
1•downbad_•30m ago•0 comments

Nokia says long-term 6G is not doable without Nvidia

https://www.lightreading.com/6g/nokia-says-long-term-6g-is-not-doable-without-nvidia
1•porridgeraisin•30m ago•0 comments

Owner of 33rd ever Apple-1, demos working version [video]

https://www.youtube.com/shorts/K2gFNfNejVU
1•lifeisstillgood•33m ago•0 comments

Taco Bell lettuce at centre of growing US diarrhoea outbreak

https://news.sky.com/story/taco-bell-lettuce-at-centre-of-growing-us-diarrhoea-outbreak-13564220
1•austinallegro•35m ago•0 comments

EEG shows brain can simultaneous encode two speech streams

https://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.3003876
3•giuliomagnifico•36m ago•0 comments

WSL2 monitor mode/packet injection using an AR9271 and custom kernel

https://github.com/BicycleJunkie1971/wsl2-ar9271-monitor
4•MPGANSERT•48m ago•0 comments

Looking for a Fall 2026 / Winter-Spring 2027 Remote Internship

2•cnnadozi•48m ago•0 comments

Spot Birds Not Golf

https://simonwillison.net/2026/Jul/17/spot-birds-not-golf/
2•zdw•50m ago•0 comments

Two LLM-assisted memory-management patch sets

https://lwn.net/Articles/1080162/
2•signa11•54m ago•0 comments

Show HN: Pocket Voice: TTS and Voice clone in the browser

https://h3manth.com/ai/pocket-voice/
2•init0•57m ago•0 comments

Irreducible Loops

https://maskray.me/blog/2026-07-12-irreducible-loops
2•matt_d•57m ago•0 comments

Ask HN: I feel like I've lost my identity due to AI

4•im-not-enjoying•59m ago•0 comments

Ask HN: Workflow Automation vs AI Agents?

2•dicksent•59m ago•0 comments

Native Foxglove Visualization in LeRobot

https://foxglove.dev/blog/native-foxglove-visualization-in-lerobot
2•intrepidsoldier•1h ago•0 comments

Euclideon Are Back as Nuclideon

https://nuclideon.com/
1•bananaboy•1h ago•1 comments

MCP onboarding is the most exciting thing happening in tech

https://moekhalil.substack.com/p/mcp-onboarding-is-the-most-exciting
2•mfkhalil•1h ago•0 comments

Databricks raises $5B with a $188B valuation

https://www.reuters.com/legal/transactional/databricks-valued-188-billion-after-coatue-led-invest...
3•ansnadeem•1h ago•0 comments