frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Ask HN: When did Spotify become YouTube/TikTok?

2•binarypixel•4m ago•0 comments

The Paradox of Karl Popper

https://www.scientificamerican.com/blog/cross-check/the-paradox-of-karl-popper/
1•baxtr•6m ago•0 comments

I factored the number RSA1024-1 using my home-built QPU stack

https://twitter.com/veorq/status/2048320115075137864
1•keepamovin•6m ago•0 comments

Craving work-life balance is a red flag, says Fortune 500 Europe CEO

https://fortune.com/2026/04/22/work-life-balance-bupa-fortune-500-ceo-barack-obama-work-weekend/
1•thisislife2•8m ago•0 comments

Car Dependency in Urban Accessibility

https://arxiv.org/abs/2604.01019
1•Anon84•12m ago•0 comments

What Made Lisp Different (2002)

https://paulgraham.com/diff.html
1•tosh•18m ago•0 comments

Magnet with near-zero external field could reshape future electronics

https://phys.org/news/2026-04-magnet-external-field-reshape-future.html
1•rbanffy•20m ago•0 comments

Web UI in Go? Nothing Can Stop Me

https://medium.com/@mailbox.sq7/web-ui-in-go-nothing-can-stop-me-60d75c4cd4f0
1•alzhi7•24m ago•1 comments

Show HN: Axle – a11y/WCAG CI that proposes real source-code fixes via Claude

https://axle-iota.vercel.app
1•swapvideo•24m ago•1 comments

The Podcast Where You Can Eavesdrop on the A.I. Elite

https://www.nytimes.com/2026/04/26/business/dwarkesh-patel-podcast-ai.html
3•pilooch•28m ago•0 comments

Telegram Launches Managed Bots

https://twitter.com/telegram/status/2048098691391852966
1•hestefisk•29m ago•0 comments

The incredible double life of a spyware salesman turned spy

https://www.ft.com/content/fef3bc59-358a-4e43-aef1-e61194d8b908
1•Anon84•35m ago•1 comments

Designing for Agents

https://twitter.com/teddy_riker/status/2047312986696454584
1•talboren•35m ago•0 comments

It's OK to Use Floating Point for Money

https://suricrasia.online/blog/its-ok-to-use/
1•edent•37m ago•0 comments

The slow death of purposeless walking (2014)

https://www.bbc.com/news/magazine-27186709
1•downbad_•38m ago•1 comments

'Athens cannot operate as a hotel':mayor vows to rescue capital from overtourism

https://www.theguardian.com/world/2026/apr/25/athens-cannot-operate-as-a-giant-hotel-mayor-vows-t...
2•mschuster91•46m ago•0 comments

Show HN: A free ESG stock screener that publishes its losses and methodology

https://jumpstartsignal.com/
1•irldexter•48m ago•0 comments

Could creativy in LLM emerge by reframing language?

1•nopelican•58m ago•0 comments

21-year-old Polish Woman Fixed a 20-year-old Linux Bug

https://itsfoss.com/news/kamila-enlightenment-e16-bug/
1•stared•1h ago•2 comments

Show HN: DSS, a lightweight TUI spreadsheet editor and dashboard in Go

https://github.com/VincenzoManto/DSSGo
5•databasa•1h ago•0 comments

Statecharts: hierarchical state machines

https://statecharts.dev/
9•sph•1h ago•0 comments

Nuclear power Have we found a useful use for it? Let's ask a wolf

https://www.theguardian.com/commentisfree/picture/2026/apr/24/nuclear-power-have-we-finally-found...
1•leonidasrup•1h ago•0 comments

Rockchip-vaapi – VA-API hardware video decode driver for RK3588

https://github.com/woodyst/rockchip-vaapi
1•woodyst•1h ago•0 comments

Thinking Outside the Box: New Attack Surfaces in Sandboxed AI Agents

https://www.lasso.security/blog/sandboxed-ai-agents-attack-surface
1•irememberu•1h ago•0 comments

Can LLMs Scale to AGI?

1•mr_rajat•1h ago•1 comments

Show HN: OpenClaw but Efficient and with an SDK

https://www.npmjs.com/package/fastyclaw
1•dontoni•1h ago•0 comments

Ask HN: Can submissions omit both the "url" and "text" field?

1•sillysaurusx•1h ago•1 comments

Show HN: Play on your TV using mobile phones as controllers – PadlessBox

https://padlessbox.com/
2•b4rtaz__•1h ago•0 comments

Singapore's Foreign Minister Builds an AI "Second Brain" Using NanoClaw

https://officechai.com/ai/singapores-foreign-minister-builds-an-ai-second-brain-using-nanoclaw-sa...
1•doppp•1h ago•0 comments

"Self-aware" robots learn by watching humans. Is that a good thing?

https://www.npr.org/2026/04/24/nx-s1-5797863/self-aware-robots-future-laundry-work-home
1•01-_-•1h ago•1 comments