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

Open AI No. 2 Exec at OpenAI Fidji Simo is leaving the company

https://techcrunch.com/2026/07/09/fidji-simo-steps-down-from-openais-no-2-role/
1•jeffhwang•8m ago•0 comments

Record and Replay, teach AI agents desktop workflows by showing them once

https://github.com/video-db/open-record-replay
1•ashu_trv•9m ago•0 comments

Ask HN: Do we need a support group for developers alienated by LLMs?

3•sph•13m ago•0 comments

Russian Surveillance Software Suppresses Georgian Civilians Rights

https://algorithmwatch.org/en/russian-surveillance-face-recognition-georgia/
1•fodmap•14m ago•0 comments

Open Source E-Reader

https://liliputing.com/crowdfunding-begins-for-open-book-touch-an-open-source-ereader/
1•djfergus•15m ago•0 comments

Iran Hatched Fresh Plot to Kill Trump, Israel Told U.S.

https://www.wsj.com/world/middle-east/iran-hatched-fresh-plot-to-kill-trump-israel-told-u-s-1511d9d2
1•throw310822•16m ago•1 comments

Bayeux Tapestry arrives at British Museum under police escort in dead of night

https://news.sky.com/story/bayeux-tapestry-arrives-at-british-museum-in-dead-of-night-under-polic...
2•austinallegro•17m ago•0 comments

NixOS on real hardware is more complex than you think. Noctalia V5 and LabWC

https://grigio.org/nixos-noctalia-v5-labwc-real-hardware/
1•grigio•19m ago•0 comments

The triage is the product: running AI agents against Ethereum's protocol code

https://blog.ethereum.org/2026/07/09/triage-is-the-product
1•quantumgarbage•21m ago•0 comments

Crawl4AI: Open-source web crawler and scraper for LLMs

https://github.com/unclecode/crawl4ai
1•mpfect•22m ago•0 comments

OpenAI, Anthropic Employees Could Buy ~1/3 of All Homes in SF with IPO Earnings

https://www.redfin.com/news/openai-anthropic-housing-wealth/
1•littlexsparkee•23m ago•0 comments

Show HN: ePub Fixer – repair a narrow set of EPUBCheck errors

https://epub-fixer.com
1•shanewei•23m ago•0 comments

Show HN: Qualify – open-source agent for sales

https://github.com/chaitanyya/sales
2•brownpoints•27m ago•0 comments

The Id Software Cuts Will Change It Forever: 'I Don't See How They Make a Game'

https://kotaku.com/the-cuts-at-doom-maker-id-software-go-shockingly-deep-i-dont-see-how-they-make...
2•Michelangelo11•28m ago•0 comments

PwC employee was working remotely in India when he should have been in Dublin

https://www.irishtimes.com/business/work/2026/07/09/pwc-employee-was-working-remotely-in-india-wh...
1•CringeOut•30m ago•0 comments

CleoBench: Can Fable mathematically prove Cleo's integrals?

https://rain-1.github.io/cleo-bench/
1•rain1•30m ago•0 comments

Demand Unlocked: The Innovation Playbook [video]

https://www.youtube.com/watch?v=CHKU_CjFX9I
1•julienreszka•30m ago•0 comments

SiyanoAV Total Security Antivirus for Advanced PC and Internet Security

https://siyanoav.com/total-security
1•rahulyadavv•31m ago•0 comments

AI-generated videos to maximally drive a target brain region

https://nevo-project.epfl.ch/
2•smusamashah•34m ago•0 comments

EasyJet agrees to rival £5.7B takeover bid

https://www.bbc.co.uk/news/articles/cgjxqq9jg8yo
1•jonjomckay•37m ago•0 comments

China recovers Long March 10B rocket following maiden flight

https://www.chinadaily.com.cn/a/202607/10/WS6a507465a310986e2b464988.html
3•TMWNN•37m ago•2 comments

Nobel-Winning U.S. Chemist Will Move to China to Lead A.I. Institute

https://www.nytimes.com/2026/07/09/science/nobel-winning-us-chemist-will-move-to-china-to-lead-ai...
3•pseudolus•40m ago•1 comments

CO2 overload in blood suggests potentially toxic atmosphere within 50 years

https://link.springer.com/article/10.1007/s11869-026-01918-5
2•littlexsparkee•41m ago•0 comments

Verity – Chrome extension that auto fact-checks AI responses with cited sources

https://chromewebstore.google.com/detail/verity-—-ai-truth-reveale/pdobceidjkciljhdglpmkkjdbjna...
1•HalaDefense•41m ago•0 comments

Localghost. A little ghost to help you NPM dev

https://hamedb89.github.io/localghost/
2•hamedbahrami•47m ago•1 comments

The Secret Sabotage Behind Your Worst DOS-to-Windows Memories

https://comuniq.xyz/post?t=1377
1•01-_-•49m ago•0 comments

Show HN: BastionRoute – An outbound-initiated WebSocket relay fabric for UDP

https://github.com/klauscam/BastionRoute
1•klauscam•54m ago•0 comments

SensorFM: Towards a general intelligence and interface for wearable health data

https://research.google/blog/sensorfm-towards-a-general-intelligence-and-interface-for-wearable-h...
1•NathaP•54m ago•0 comments

TrainRouter – 601 of the great train routes on one interactive map

https://trainrouter.com/
1•Flightmussy•56m ago•0 comments

Let's build a simple interpreter for APL – part 1

https://mathspp.com/blog/lsbasi-apl-part1
1•mpweiher•56m ago•0 comments