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: Structured Promptmaker

https://www.gptpromptmaker.com/
2•sanathbhat•4m ago•0 comments

Porting a clearing-house money market to a smart contract

1•citizensinan•7m ago•0 comments

Arcentry is back – create beautiful 3D infrastructure diagrams

https://arcentry.com/?src=hn
1•wolframhempel•7m ago•0 comments

Listening to loud music on a Singapore bus? It'll cost you

https://www.cnn.com/2026/09/22/travel/singapore-bus-rules-music-intl-hnk
2•edward•8m ago•0 comments

"Father of The Elder Scrolls" Julian LeFay has passed away (2025)

https://www.gamesradar.com/games/the-elder-scrolls/father-of-the-elder-scrolls-julian-lefay-has-p...
2•anotherhue•9m ago•0 comments

I am done with this shit

https://www.reddit.com/r/ClaudeAI/comments/1wm5c21/i_am_done_with_this_shit/
1•meander_water•9m ago•0 comments

Tradeoff considerations while running LLM models locally

https://swapniltalekar.substack.com/p/should-you-be-running-llm-models
1•swapnilt•12m ago•0 comments

Scott Jenson: Are we going to use the same Desktop UX forever? [video]

https://www.youtube.com/watch?v=V7AfAcQwLW0
1•KitN•13m ago•0 comments

Secretive gambling industry exposed in leak

https://www.ftm.eu/articles/curacao-secretive-gambling-industry-exposed-in-leak
2•fh973•14m ago•0 comments

AurionMail: E2EE suite (CryptPad and Stalwart) with single-password UX

https://aurionmail.github.io/docs/
1•polo46•18m ago•0 comments

Ask HN: How do you cope with AI being used to target and bomb children?

2•trumbitta2•20m ago•2 comments

Claude Opus 5.5, GPT-6 Sol, GPT-6 Luna, and a new price war

https://simonwillison.net/2026/Sep/22/opus-and-sol-and-luna/
1•theanonymousone•22m ago•0 comments

Show HN: Semantic Search for Zotero Local

https://github.com/ilDon/zotero-semantic-search
1•ildon•23m ago•0 comments

Show HN: Listen to your eBook and control the playback sentence by sentence

https://documentplayer.com/
1•janpmz•23m ago•0 comments

GPT-6 Sol and Luna push the cost efficiency frontier by halving token cost

https://artificialanalysis.ai/articles/gpt-6-sol-and-luna-push-the-cost-efficiency-frontier
1•theanonymousone•25m ago•0 comments

Observe – local semantic code search that admits when grep beats it

https://github.com/tritsystem/012-trit-search
1•gbranaa4•32m ago•0 comments

NobodyWho is an inference engine that lets you run LLMs locally and efficiently

https://github.com/nobodywho-ooo/nobodywho
1•Bluestein•35m ago•0 comments

Show HN: I built a site for my 42 km walk across 30 Tokyo stations

https://yamathon.tonymanh.space
1•tonymanh•36m ago•0 comments

Taming the ML Firehose: Scaling Feature Consistency

https://www.uber.com/us/en/blog/taming-ml-firehose/
1•iamsyr•36m ago•0 comments

Tearing Down a Spring Drive

https://www.thenakedwatchmaker.com/decon-seiko-snowflake
1•stefanv•38m ago•0 comments

New AI technique could make minimally invasive surgeries safer and more precise

https://news.mit.edu/2026/new-ai-technique-could-make-minimally-invasive-surgeries-safer-more-pre...
2•ycombinatronics•41m ago•1 comments

Rebranding artificial intelligence as super intelligence

https://www.bbc.com/news/videos/c8n5d9x10v14o
3•tin7in•41m ago•1 comments

Jev in 25 Lines of Python

https://www.nobodywho.ai/posts/jev-in-25-lines/
8•bashbjorn•42m ago•2 comments

Nvitop: A better top for Nvidia GPUs

https://github.com/XuehaiPan/nvitop
1•Nina_antalpha•43m ago•1 comments

Aesthetic Terminal ePub Reader

https://github.com/UsboKirishima/rr
1•333revenge•47m ago•0 comments

Gemini Hacked Three Companies in First Known Breakout by Google's AI

https://simonwillison.net/2026/Sep/18/gemini-hacked-three-companies/
2•coffee•48m ago•0 comments

Linux Command Line Tricks that you do not know yet

https://lovethepenguin.com/
1•torgeros•57m ago•0 comments

Show HN: Newdo – a todo list where the list is an output, not an input

https://newdo.beaverminds.com
1•shaanjus4u•58m ago•0 comments

Grit your teeth and ship it

https://www.seangoedecke.com/grit-your-teeth-and-ship-it/
1•coffee•59m ago•0 comments

Discourse (open source forums) adds Discord-style voice and video calls

https://meta.discourse.org/t/voice-discord-style-voice-and-video-rooms-now-bundled-with-discourse...
1•Scaled•59m ago•0 comments