frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•12mo 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•12mo 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•12mo 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).

LLMorphism: When humans come to see themselves as language models

https://arxiv.org/abs/2605.05419
1•okey•1m ago•0 comments

Real signals or artificial stereotypes? Adventures with a cultural Copilot

https://kucharski.substack.com/p/real-signals-or-artificial-stereotypes
2•ceejayoz•7m ago•0 comments

In a quest to becoming AI independent

https://adlrocha.substack.com/p/adlrocha-in-a-quest-to-becoming-ai
4•adlrocha•17m ago•0 comments

Show HN: Tinyblok – publishes conditioned sensor data to NATS from an ESP32

https://github.com/lexvicacom/tinyblok
2•alexjreid•18m ago•0 comments

RISC-V Serial Debug Protocol Specification (Draft)

https://gitlab.com/lauterbach/riscv-rsdp-spec
2•jonesjohnson•19m ago•0 comments

Gen Z Resentment Toward AI Grows as Adoption Stagnates and Workplace Fears Mount

https://www.waltonfamilyfoundation.org/about-us/newsroom/gen-z-resentment-toward-ai-grows-as-adop...
3•mgh2•20m ago•0 comments

Eve

https://witheve.com/
2•tosh•21m ago•0 comments

Infinitary Logic

https://en.wikipedia.org/wiki/Infinitary_logic
1•soupspaces•33m ago•0 comments

DMA: A Community Hackerspace in Seattle

https://dma.space
1•bleeperblooper•35m ago•0 comments

Cursor CVE-2026-26268: Hidden Git hooks RCE via agents autonomous Git operations

https://nvd.nist.gov/vuln/detail/CVE-2026-26268
3•Armor1AI•40m ago•0 comments

JavaScript Tail Call Optimization in ES2015: Unimplemented and Stack Issues

https://blog.gaborkoos.com/posts/2026-05-09-Your-Recursion-Is-Lying-to-You/
1•birdculture•42m ago•0 comments

A Day in the Life of an "Enshittificator" (Norwegian Consumer Council) [video]

https://www.youtube.com/watch?v=T4Upf_B9RLQ
2•marojejian•50m ago•0 comments

From RSS Feeds to Atom Feeds

https://susam.net/from-rss-to-atom.html
1•susam•53m ago•0 comments

Show HN: Free Google Places API alternative using OpenStreetMap (no API key)

https://bizdata-web.vercel.app
4•johnleslie_pm•57m ago•0 comments

Thinking of the Children

https://blog.viewfromtheweb.com/thinking-of-the-children-4ed324d5/
1•rickdg•58m ago•0 comments

Show HN: Great Little Software – interviews with solo developers

https://greatlittle.software/
2•valeriavg_dev•1h ago•1 comments

LibreOffice 26.4 Beta Experiments with AI Writing Features

https://www.linuxjournal.com/content/libreoffice-264-beta-experiments-ai-writing-features-and-sma...
3•throw_await•1h ago•0 comments

AI in the sky: Inside the FAA plan to overhaul air traffic

https://www.politico.com/news/2026/05/09/faa-artificial-intelligence-00909097
4•giuliomagnifico•1h ago•0 comments

'Try, Score, Change': Reinforcement Learning for Children

https://gwern.net/rl-children
2•helloplanets•1h ago•0 comments

Red Card or Black Card? The Conscription Lottery in Thailand

https://www.nytimes.com/2026/05/10/world/asia/thailand-conscription-lottery.html
2•_tk_•1h ago•0 comments

Could Frontier AI Researchers Collectively Slow the Race? A Conditional Pledge

https://www.lesswrong.com/posts/rCvyfKZfeaDDkTHjB/could-frontier-ai-researchers-collectively-slow...
2•joozio•1h ago•0 comments

Netlify Is Down

https://dnschecker.org/#A/netlify.app
2•pppone•1h ago•1 comments

Die Hard on ICE

https://medium.com/luminasticity/die-hard-on-ice-f767b4fa07af
1•bryanrasmussen•1h ago•1 comments

OpenSwarm – High-Performance AI Swarms with OpenSwarm

https://alphametrics.substack.com/p/openswarm-unlocking-scalability-by
2•bratak•1h ago•0 comments

High-precision HDC reference instrument for the Sol Star System

https://pypi.org/project/ephemerides-spectral/
1•lemonforest•1h ago•0 comments

Mech is a programming language for building data-driven systems robots, games

https://github.com/mech-lang/mech
2•tosh•1h ago•0 comments

The Worlds Left to Conquer

https://ludic.mataroa.blog/blog/the-worlds-left-to-conquer/
3•tao_oat•1h ago•1 comments

Matrix Chat with Embed Search Engine

https://blog.mwmbl.org/articles/matrix-chat-with-embed-search-engine/
1•daoudc•1h ago•0 comments

PRD Driven Development

https://debarshibasak.github.io/readables/blogs/prd-driven-development.html
2•debarshri•1h ago•0 comments

s4 – Super Simple Storage Service

https://github.com/rh-aiservices-bu/s4
2•gudvardur•1h ago•0 comments