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

I Was Lonely and Let an App Pick My New Friends. Here’s How It Went

https://thewalrus.ca/i-was-lonely-and-let-an-app-pick-my-new-friends-heres-how-it-went/
1•pseudolus•1m ago•0 comments

How to be anti-social – a guide to incoherent and isolating social experiences

https://nate.leaflet.pub/3mk4xkaxobc2p
1•calcifer•4m ago•0 comments

Building an agentic escrow for software projects

1•sushrut1058•5m ago•0 comments

nowhere: an entire website encoded in a URL

https://hostednowhere.com/
2•bpierre•8m ago•0 comments

Ask HN: Are there any difference using open source tool instead commercial subs?

1•chalshik•13m ago•0 comments

Show HN: Figpack science viz – Python script → Shareable HTML Bundle in cloud

https://figpack.org
1•jmagland•13m ago•0 comments

AI agent designs a complete RISC-V CPU from a 219-word spec sheet in 12 hours

https://www.tomshardware.com/tech-industry/artificial-intelligence/ai-agent-designs-a-complete-ri...
1•fork-bomber•22m ago•0 comments

How drones could be used to track plastic litter on Irish beaches

https://www.rte.ie/brainstorm/2026/0424/1569594-ireland-beaches-plastic-pollution-litter-drone-fo...
1•austinallegro•26m ago•0 comments

Show HN: Daily China AI news briefing – engineering, product, and business

https://overnightai.substack.com/p/china-ai-news-eight-chinese-chip
1•jackyli02•27m ago•0 comments

Ask HN: I built an AI planner that adapts routines automatically – feedback?

1•Profazia•32m ago•0 comments

FDA gives the green light to the first gene therapy for deafness

https://www.npr.org/2026/04/23/nx-s1-5795526/deafness-gene-therapy-regeneron
4•geox•32m ago•0 comments

Wisp – Social that's fun again

https://wisp.mobile
2•janandonly•33m ago•0 comments

Wikipedia's AI Policy

https://en.wikipedia.org/wiki/Wikipedia:Artificial_intelligence
8•Antibabelic•36m ago•0 comments

Kremlin's tightening grip on internet fuels Russian discontent

https://www.bbc.com/news/articles/cr510de17jlo
2•breve•38m ago•0 comments

Mathesar 0.10.0

https://docs.mathesar.org/0.10.0/releases/0.10.0/
1•klaussilveira•39m ago•0 comments

Mounting tar archives as a filesystem in WebAssembly

https://jeroen.github.io/notes/webassembly-tar/
3•datajeroen•39m ago•0 comments

Impactmel Is Available

https://impactmel.com
1•pndize•40m ago•0 comments

Hidden Secrets in the ArXiv: Information Disclosure in Preprint Source Files

https://arxiv.org/abs/2604.20927
1•bageldesert•41m ago•0 comments

Ask HN: What sw do you dream about but don't have the time to code yourself?

1•curtisblaine•44m ago•1 comments

Artificial intelligence is creeping into American lawmaking

https://www.economist.com/united-states/2026/04/23/artificial-intelligence-is-creeping-into-ameri...
1•edward•44m ago•0 comments

Ask HN: Am I getting old, or is working with AI juniors becoming a nightmare?

6•MichaelRazum•45m ago•4 comments

Ask HN: Who is using DeepSeek in production

2•h99•45m ago•0 comments

DeepSeek-V4: Making 1M token context efficient

https://firethering.com/deepseek-v4-open-source-million-token-context/
3•steveharing1•45m ago•0 comments

OpenAI has the governance structure of a unicorn – it does not exist

https://readuncut.com/open-ai-has-little-effective-governance/
1•dnsb•47m ago•0 comments

Half a Month of Consolation Writing Advice

https://www.astralcodexten.com/p/half-a-month-of-consolation-writing
1•herbertl•49m ago•0 comments

How to Make Sense of AI

https://commoncog.com/how-to-make-sense-of-ai/
2•dnnddidiej•52m ago•0 comments

Seed3D 2.0

https://seed.bytedance.com/en/seed3d_2_0
1•pella•52m ago•0 comments

Why software fundamentals matter more than ever [video]

https://www.youtube.com/watch?v=v4F1gFy-hqg
1•zingar•54m ago•0 comments

The global edtech boom is fading as investors look elsewhere

https://restofworld.org/2026/edtech-funding-collapse-k12-startups-ai-workforce/
1•thm•54m ago•0 comments

Removal of Microplastics from Drinking Water by Moringa Oleifera Seed

https://pubs.acs.org/doi/10.1021/acsomega.5c11569
3•fodmap•55m ago•0 comments