frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Show HN: GitHub Repo Agent – an agent that explores and reasons on GitHub repos

https://github.com/gauravvij/GithubRepoAgent
1•gauravvij137•1m ago•0 comments

I Put a Full JVM Inside a Browser Tab

https://bmarti44.substack.com/p/i-put-a-full-jvm-inside-a-browser
1•todsacerdoti•3m ago•0 comments

Full speech pipeline in native Swift/MLX – ASR, TTS, speech-to-speech, on-device

https://github.com/ivan-digital/qwen3-asr-swift
1•ipotapov•3m ago•1 comments

People in northeast BC say rest of province should embrace year-round time zone

https://www.cbc.ca/news/canada/british-columbia/time-change-british-columbia-9.7112139
1•divbzero•4m ago•0 comments

California to require age verification for all OS including Linux

https://www.tomshardware.com/software/operating-systems/california-introduces-age-verification-law
2•hambes•5m ago•0 comments

Rare Not Random – Using Token Efficiency for Secrets Scanning

https://lookingatcomputer.substack.com/p/rare-not-random
1•boyter•7m ago•0 comments

Strict Monospace Font for Chinese Japanese Korean for AI LLM-CLI Users|CodexMono

https://www.npmjs.com/package/@monolex/codexmono
1•monokist•10m ago•1 comments

Working on Things That Suck

https://mayberay.bearblog.dev/working-on-things-that-suck/
1•mugamuga•13m ago•0 comments

Ask HN: How Do Emergency Alerts on Phone Work?

2•rishikeshs•17m ago•2 comments

US President struggles to explain why he launched another Middle Eastern war

https://www.ft.com/content/fd31c6ad-39f0-4fae-851c-fadf44f006eb
8•Jimmc414•24m ago•3 comments

Apple Does Value (Week)

https://om.co/2026/03/02/apple-does-value-week/
1•tosh•25m ago•1 comments

The Pointless War Between The Pentagon and Anthropic

https://www.wsj.com/opinion/the-pointless-war-between-the-pentagon-and-anthropic-9284fd37
4•jrosenblatt•31m ago•0 comments

Show HN: wo; a better CD for repo management

https://github.com/anishalle/wo
1•itsagamer124•35m ago•0 comments

Show HN: AI gaming copilot that uses a phone camera instead of screen capture

https://github.com/ninja-otaku/Project_Aegis
1•Genome123•36m ago•0 comments

OpenAI Amends A.I. Deal with The Pentagon

https://www.nytimes.com/2026/03/02/technology/openai-pentagon-deal-amended-surveillance.html
4•fatboy•36m ago•1 comments

Show HN: Archilvx-Own your Twitter data because cloud tools will fail you

https://www.archivlyx.com/twitter-archive
1•ErinSunny•37m ago•0 comments

Israel hacked Iran traffic cams for years to pinpoint Khaemnei prior to strike

https://www.google.com/search?q=https://www.ft.com/content/1317d740-410c-46a2-97b7-6573e0477121
4•c420•40m ago•1 comments

What 10 Years of Building Social Apps Taught Me

https://twitter.com/nikitabier/status/1481118406749220868
2•metmirr•40m ago•0 comments

OSINT Expert Recreates Timeline of Operation Epic Fury in Interactive 3D Model

https://www.jfeed.com/news-world/operation-epic-fury-3d-replay
2•rapnie•45m ago•1 comments

Show HN: Trade Stocks and Crypto On-Chain with Full Transparency

https://www.aulico.com
2•rendernos•45m ago•0 comments

Buckle Up for Bumpier Skies

https://www.newyorker.com/magazine/2026/03/09/buckle-up-for-bumpier-skies
10•littlexsparkee•54m ago•1 comments

Claude's Constitution and Asimov's Laws

https://yadin.com/notes/asimov/
3•dryadin•1h ago•0 comments

Data-structure-typed – TreeMap, Heap, Graph and more for TypeScript

https://github.com/zrwusa/data-structure-typed
1•zrwusa•1h ago•0 comments

Stop macOS 26 nagging with one tiny policy tweak

https://www.theregister.com/2026/03/02/stop_tahoe_update/
2•fghorow•1h ago•0 comments

Is Mandarin superior for LLM data?

https://medium.com/@tjanmichela/the-language-of-intelligence-could-mandarin-be-the-secret-to-smar...
5•treebeard901•1h ago•3 comments

Show HN: DiffMem in production, Git-based AI memory

https://withanna.io
2•alexmrv•1h ago•0 comments

Constraints and the Lost Art of Optimization

https://denodell.com/blog/constraints-and-the-lost-art-of-optimization
1•CharlesW•1h ago•0 comments

Show HN: Calendar Tool for College Students

https://almanaccal.com/
1•TG_Dev•1h ago•0 comments

Show HN: Private AI Document Server

https://github.com/queryhat/super-hat/blob/main/README.md
1•chhetri978•1h ago•1 comments

Underrated Reasons to Dislike AI

https://www.autodidacts.io/underrated-reasons-to-dislike-ai/
1•Curiositry•1h ago•0 comments