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

Switching password managers is easy and safe on Android

https://blog.google/products-and-platforms/platforms/android/switch-password-managers/
1•vdelitz•59s ago•0 comments

The Association Between ADHD and GI Symptoms: A Meta-Analysis

https://journals.sagepub.com/doi/10.1177/10870547261469626
1•Jimmc414•1m ago•1 comments

Duck.ai is a feature that allows you to have private conversations

https://duckduckgo.com/duckduckgo-help-pages/duckai
1•Bluestein•2m ago•0 comments

Idea Bench

https://reflector.dev/idea-bench/
1•0xlosh•3m ago•1 comments

Italian lobby group calls for 80% EU tariff on Chinese cars and parts

https://www.reuters.com/business/retail-consumer/italian-lobby-group-calls-80-eu-tariff-chinese-c...
1•teleforce•3m ago•0 comments

A Deep Dive into StyleX

https://flaviocopes.com/stylex/
1•ibobev•5m ago•0 comments

GEN-1.5: Is robotics having its ChatGPT-3 moment?

https://generalistai.com/blog/gen-1.5
2•serpicourge•5m ago•1 comments

Extending Raschka's GPT-2: an MoE trained from scratch on an RTX 3090

https://www.gilesthomas.com/2026/09/gpt-2-to-moe
2•ibobev•5m ago•0 comments

The PoW that outlives crypto

https://twitter.com/_petoshi/status/2098299567531790540
1•notyethacker•5m ago•0 comments

When Computers Were Magic

https://www.goto10retro.com/p/when-computers-were-magic
1•ibobev•6m ago•0 comments

How Emmanuel Macron brought France's AI darling to the world stage

https://www.politico.eu/article/mistral-ai-arthur-mensch-emmanuel-macron-gouvernement-france/
1•vrganj•7m ago•0 comments

Ask HN: Is using AI harmful to human Critical Thinking and Decision making?

1•skwasimin•13m ago•2 comments

Automake-1.19 Released [Stable]

https://lists.gnu.org/archive/html/info-gnu/2026-09/msg00000.html
1•palaiologos•14m ago•0 comments

Ask HN: Best practices for low-cost open-weight model hosting?

1•PlatformDTC•15m ago•0 comments

Codex kicked me out of Astra

1•dantodor•15m ago•1 comments

Space Cola Wars

https://en.wikipedia.org/wiki/Space_Cola_Wars
1•Bluestein•15m ago•0 comments

U4RIA: An emotional wellness app using dynamic audio and AI personalization

https://u4riahub.com
1•Sharanxxxx•19m ago•0 comments

My iPad replaced my MacBook on the go

https://twitter.com/patrikinzinger/status/2098313922084311046
1•tosh•19m ago•0 comments

The lifecycle of a sharded Postgres query

https://planetscale.com/blog/the-lifecycle-of-a-sharded-postgres-query
1•florianpipes•22m ago•0 comments

Ask HN: Does your org allow sending feedback to Claude?

https://privacy.claude.com/en/articles/7996868-is-my-data-used-for-model-training
1•burgerboii•22m ago•2 comments

A connectomics milestone: Mapping the complete male fruit fly brain

https://research.google/blog/a-connectomics-milestone-mapping-the-complete-male-fruit-fly-brain/
1•rzk•22m ago•0 comments

Blizzard Workers Win Historic Union Contract That Could Set a New Standard

https://www.gamespot.com/articles/blizzard-workers-win-historic-union-contract-that-could-set-a-n...
2•latexr•24m ago•0 comments

Peeriot Releases Myrmic Developer Preview at RustConf 2026

https://rustfoundation.org/media/guest-post-peeriot-releases-myrmic-developer-preview-at-rustconf...
1•MicPe•28m ago•0 comments

Show HN: Choicer Voicer, put your own voice into movie and game scenes

https://playchoicervoicer.com/
1•trywork2026•31m ago•1 comments

Foomflops: Three Decades of AI Predictions

https://foom.hyperplex.org/
1•EvgeniyZh•31m ago•0 comments

When the RIAA sued a 12-year-old for MP3 piracy

https://dfarq.homeip.net/that-time-the-riaa-sued-a-12-year-old-for-mp3-usage/
4•giuliomagnifico•32m ago•0 comments

Archive.ubuntu.com and a few other components are down

https://status.canonical.com/#/incident/KNms6QK9ewuzz-7xUsPsNylV20jEt5kyKsd8A-3ptQG_37xwBenEnYvK-...
1•vanschelven•33m ago•1 comments

Dating Apps Are Dying

https://time.com/article/2026/09/09/dating-apps-are-dying/
5•carabiner•35m ago•2 comments

Climate 'feedback loops' could worsen global warming by 30%, study finds

https://www.theguardian.com/environment/2026/sep/10/climate-feedback-loops-global-warming-study
3•signa11•38m ago•0 comments

Apple Watch Ultra 4 Drops Glonass Support

https://www.macrumors.com/2026/09/10/apple-watch-ultra-4-glonass/
2•tosh•40m ago•0 comments