frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

Understanding Data Collection, Brokerage, Spam in the Lead Marketing Ecosystem

https://arxiv.org/abs/2604.06759
1•ericpauley•5m ago•0 comments

Show HN: Better.ftp – cycling app for FTP tests without subscription

https://betterftp.cc/
2•niecore•8m ago•0 comments

Managing metadata is essential in LLM world

https://www.itbrew.com/stories/managing-metadata-is-essential-in-llm-world
1•mooreds•9m ago•0 comments

Ask HN: Are coding interview still relevant?

2•manidharv•10m ago•1 comments

Visual Studio Code for Education roadmap update

https://vscodeedu.com/whats-new/2645
1•acbart•10m ago•1 comments

Alignment pretraining: AI discourse creates self-fulfilling (mis)alignment

https://arxiv.org/abs/2601.10160
2•anigbrowl•12m ago•0 comments

Keeping the Cultural Uplands Alive

https://jaymollica.com/blog/keeping-the-cultural-uplands-alive/
1•thebigship•12m ago•0 comments

How to Start an AI Business as a Teenager in 2026 [video]

https://www.youtube.com/watch?v=X_lxuGsFu4M
1•botang1•12m ago•0 comments

Secret History of Silicon Valley [video]

https://www.youtube.com/watch?v=ZTC_RxWN_xo
2•gmays•14m ago•0 comments

The Jacobian, the Damping Term, and the Geometry of Reach

https://atomsfrontier.substack.com/p/the-jacobian-the-damping-term-and
2•jpatel3•15m ago•0 comments

The Melancholy of Slaying Monsters

https://thereader.mitpress.mit.edu/the-strange-melancholy-of-slaying-monsters/
1•foliveira•16m ago•0 comments

Show HN: Onionfutures.com: transferable contracts for future delivery of onions

https://onionfutures.com/
3•a11ce•17m ago•0 comments

Show HN: Tracecast – open-source generative data apps built on top of Marimo

https://github.com/tracecast/open_data_apps
1•malachyd•19m ago•0 comments

Running PyTorch Models on Apple Silicon GPUs with the ExecuTorch MLX Delegate

https://pytorch.org/blog/running-pytorch-models-on-apple-silicon-gpus-with-the-executorch-mlx-del...
2•0bytematt•21m ago•0 comments

Petition Against Meta's Model Capability Initiative

https://mcipetition.com/
1•zeroonetwothree•22m ago•0 comments

Who will buy your services if you fire us all?

https://carette.xyz/posts/who_will_buy_your_services/
3•LucidLynx•23m ago•0 comments

US bill proposes new national EV tax, while some push to slash gas tax to zero

https://electrek.co/2026/05/18/us-bill-would-overcharge-evs-to-pay-for-road-damage-they-arent-doing/
3•dogscatstrees•23m ago•0 comments

Return on Intelligence: The Preface to an Eight-Part Series on the AI Bubble

https://rebecca-powell.com/posts/return-on-intelligence-the-preface/
1•simonpure•25m ago•0 comments

The quiet grief of adult friendship

https://timesofindia.indiatimes.com/blogs/civil-irony/the-quiet-grief-of-adult-friendship/
3•jger15•28m ago•0 comments

Three Things about Data

https://www.undermanager.com/three-things-about-data/
1•altacc•32m ago•0 comments

Leaving the Sea of Nodes in the V8 JIT

https://v8.dev/blog/leaving-the-sea-of-nodes
1•obl•34m ago•0 comments

AI separates knowledge from identity, writing separates knowledge from memory

https://www.nvegater.com/blog/ai-separator-hn
1•nvegater•35m ago•0 comments

.at TLD is top on CF Radar

https://radar.cloudflare.com/tlds?dateRange=1d
3•labithiotis•36m ago•0 comments

Peter G. Neumann, Who Warned of Computer Security Risks, Dies at 93

https://www.nytimes.com/2026/05/17/technology/peter-g-neumann-dead.html
3•jgrahamc•39m ago•0 comments

Slop-Mop: Harm Reduction for Addicted Agents

https://scienceisneato.substack.com/p/slop-mop-harm-reduction-for-addicted
2•ji_reilly•43m ago•1 comments

I built an agent to organize 500 GB of family home videos from the 90s

https://www.mux.com/blog/using-mux-robots-to-organize-my-archive-of-90s-era-vhs-home-videos
1•dylanjha•44m ago•0 comments

Show HN: Feature flags on Redis you use – a low cost solution

https://github.com/sgs-97/redis-feature-flags
1•sgs-97•45m ago•3 comments

Holecard – CLI password manager with TOTP support

https://github.com/shabaraba/holecard
1•28304283409234•47m ago•0 comments

Mixxx: FOSS DJ Mixing Software

https://github.com/mixxxdj/mixxx
1•yacin•48m ago•0 comments

Design CLI – Automate design workflows

https://github.com/shuffle-dev/cli
1•dym3k•53m ago•1 comments