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

Political Discontent in China Is Associated with Isolating Personality Traits

https://www.journals.uchicago.edu/doi/abs/10.1086/719273
1•xnhbx•1m ago•0 comments

Apple's New CEO Must Launch 5 Product Ecosystems or Miss the Next iPhone Moment

https://greentic-ai.medium.com/apples-next-ceo-must-launch-these-5-product-ecosystems-or-miss-the...
1•mectors•1m ago•0 comments

Show HN: Playing music over movies causes them to sync

1•e1ghtSpace•1m ago•0 comments

Colorado citizens pay with rights, xAI pays nothing, long live democracy

https://aitwerp.com/signals/xai-colorado-discrimination-federal/
1•Inziu•7m ago•1 comments

Hire based on the conversation about code, not the code itself

https://dbarabashh.com/thoughts-and-experience/hire-for-the-conversation-not-the-code
1•birdculture•12m ago•0 comments

LogAct: Enabling agentic reliability via shared logs

https://arxiv.org/abs/2604.07988
1•pramodbiligiri•20m ago•0 comments

Show HN: A faithful offline recreation of the classic MS-DOS Editor

https://pascar.run
1•mysticmode•37m ago•0 comments

Managing the Unmanaged Switch

https://watchmysys.com/blog/2026/03/managing-the-unmanaged-switch/
1•luu•39m ago•0 comments

Show HN: I fixed sleep schedule by tracking solar time, so I built an app for it

https://sun.mikolajmocek.com/
1•mondonno•40m ago•0 comments

Richard Sutton – Father of RL thinks LLMs are a dead end [video]

https://www.youtube.com/watch?v=21EYKqUsPfg
2•mpweiher•41m ago•1 comments

Scaling Camera File Processing at Netflix

https://netflixtechblog.com/scaling-camera-file-processing-at-netflix-6dab2b1e80be
2•redblueflame•44m ago•0 comments

Show HN: Agent MCP Studio – build multi-agent MCP systems in a browser tab

https://www.agentmcp.studio
3•stealthtsdb•44m ago•0 comments

Testing GPT-5.5 in early access: what we are seeing so far

https://lovable.dev/blog/gpt-5-5-now-in-lovable
2•doener•50m ago•1 comments

Escrow Security for iCloud Keychain

https://support.apple.com/guide/security/escrow-security-for-icloud-keychain-sec3e341e75d/web
2•gurjeet•54m ago•0 comments

Tewart Brand on LSD, A.I. Black Boxes and the Beauty of Care [video]

https://www.youtube.com/watch?v=t8u24wvHeSE
1•born-jre•58m ago•0 comments

Code review advice for vibe coders

https://xata.io/blog/code-review-for-vibe-coders
2•tee-es-gee•1h ago•0 comments

Show HN: A CLI to use any model in your coding agent

https://getaivo.dev/
2•spirit23•1h ago•0 comments

What is Nostr? A simple guide to the protocol

https://usenostr.org/
1•vlugorilla•1h ago•0 comments

The Tiny Donut That Proved We Still Don't Understand Magnetism [video]

https://www.youtube.com/watch?v=XKSjCOKDtpk
1•mpweiher•1h ago•0 comments

List of personal sites that host Wander console, a tool to explore the small web

https://susam.codeberg.page/wander/wcn.html
2•susam•1h ago•0 comments

Naming Things Is Easy Now

https://notesbylex.com/naming-things-is-easy-now
3•lexandstuff•1h ago•0 comments

I left Vercel Pro ($20/mo) for a $10/mo VPS. 7-day Next.js migration report

https://gist.github.com/Samarth0211/b728534af45242b61b45a87a4ecdf155
1•samarth0211•1h ago•1 comments

Global Energy Flows

https://ig.ft.com/global-energy-flows/
1•saswatms•1h ago•0 comments

Mystery Cpuid Bit

http://www.os2museum.com/wp/mystery-cpuid-bit/
1•userbinator•1h ago•0 comments

Do you ever ask "Please Claude I need this my account is kinda tokenless "

https://engram-three.vercel.app/
1•-Refraction-•1h ago•1 comments

Ask HN: What should a Microblogging Site look like?

1•PiSquareS•1h ago•1 comments

ChatGPT Recommends the Same 3 Companies to Every B2B Buyer. Until They Specify

https://growtika.com/blog/chatgpt-b2b-persona-recommendations
2•Growtika•1h ago•1 comments

Ubuntu 26.04 LTS (Resolute Raccoon)

https://releases.ubuntu.com/resolute/
2•kwar13•1h ago•1 comments

Show HN: Aliasme – A shell script to memorize your commands

https://github.com/Jintin/aliasme
1•Jintin•1h ago•2 comments

PasswordStore + GnuPG + TouchID

https://gurjeet.singh.im/blog/passwordstore+gnupg+touchid
2•gurjeet•1h ago•0 comments