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: PippinVR – open-source Virtual Screen environment for macOS

https://github.com/triscuitcircuit/PippinVR
1•Whigmal•23s ago•0 comments

Give me feedback for my birthday

https://www.ericallen.io/hn
1•iEricAllen•43s ago•1 comments

Sam Altman's Remarks at the United Nations Security Council

https://openai.com/index/sam-altman-un-security-council-remarks/
1•ksec•53s ago•0 comments

Paperclip meta-harness for your agents

https://paperclip.ing/
1•FloatArtifact•2m ago•0 comments

Australian PM says OpenAI hacked government health website

https://www.yahoo.com/news/world/articles/australian-pm-says-openai-hacked-232712261.html
1•pseudolus•2m ago•0 comments

The broken windows theory of coding agents

https://www.manager.dev/newsletter/the-broken-windows-theory-of-coding-agents
1•flail•3m ago•0 comments

Fearless SIMD v1.0 is here

https://linebender.org/blog/fearless-simd-1-0/
1•robin_reala•4m ago•0 comments

War with a Mate [audio]

https://warwithamate.co.uk/
1•mooreds•4m ago•0 comments

Show HN: Wb-flow – Multi-agent CLI where state lives in Markdown, not context

https://flow.wbc-ui.com
1•wissemb1•6m ago•0 comments

Show HN: Jexxa – On Device Dictation,Now with Perpetual License

https://jexxa.org/
1•sankde•6m ago•0 comments

Best LLM for every budget, updated daily

https://bestmodelforyourbudget.terrydjony.com/
2•terryds•6m ago•0 comments

Rust compiler fork without orphan rule

https://github.com/Rust-Unchained/rust_unchained
1•cztomsik•7m ago•1 comments

Computer Latency: 1977-2017

https://danluu.com/input-lag/
1•initramfs•7m ago•0 comments

HN: Zrevick – AI-native business OS for technical founders

https://zrevick.com/
1•davidrichards•7m ago•1 comments

You probably don't know as much AI as you think you do

https://aiforactualwork.com/
1•marcelo_lebre•9m ago•1 comments

Australia to investigate if OpenAI hack of government health website broke

https://techcrunch.com/2026/09/24/australia-to-investigate-if-openai-hack-of-government-health-we...
2•sbulaev•9m ago•0 comments

What AI companies pays the people who train it

https://blastradius.dpdns.org/
1•codebyaditya•9m ago•0 comments

The Design of Signalsmith Stretch (Pitch-Shifting Algorithm)

https://signalsmith-audio.co.uk/writing/2023/stretch-design/
1•epestr•12m ago•0 comments

India's outsourced software industry grows 9.5 percent to reach $239B

https://www.theregister.com/channel/2026/09/24/indias-outsourced-software-industry-grows-95-perce...
2•ent101•13m ago•0 comments

Show HN: Quartermaster – see your real asset allocation across all accounts

https://realallocation.com
1•olympusperspect•13m ago•0 comments

Meta debuts 'Charm' device to use new AI assistant Muse on the go

https://financialpost.com/technology/meta-debuts-muse-charm-device
3•hmokiguess•14m ago•0 comments

Visualization of all roads within any city

https://github.com/anvaka/city-roads
2•bookofjoe•14m ago•0 comments

Things That Are Good to Do

https://www.quarter--mile.com/Things-That-Are-Good-to-Do
2•surprisetalk•16m ago•0 comments

Meta VR Glasses, a New Era for Virtual Reality

https://www.meta.com/blog/meta-vr-glasses-announcement-meta-connect/
5•htk•18m ago•0 comments

AI labs' job-loss plans won't say what the public gets

https://beigebook.xyz/posts/preparedness-theater/
4•anothermathbozo•18m ago•0 comments

Without watermarking, nobody will write, and nobody will read

https://twitter.com/SamuelFitouss10/status/2099490852221473003
2•mathieu4v•20m ago•0 comments

Show HN: Clueless: how I made a scalable freeform crossword generator

https://clueless.crossword.is/blog/development-history
2•informades•21m ago•1 comments

AI could make more companies worth hacking, Anthropic report suggests

https://fortune.com/2026/09/24/ai-could-make-more-companies-worth-hacking-anthropic-report-suggests/
1•Brajeshwar•21m ago•0 comments

The Hi-Res Audio Scam: What's on the Disc?

https://losslessextract.com/hi-res-audio-scam/
1•packslash•21m ago•0 comments

Some thoughts on HTML's proposed previewsrc attribute

https://shkspr.mobi/blog/2026/09/some-thoughts-on-htmls-proposed-previewsrc-attribute/
1•Brajeshwar•21m ago•0 comments