frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•7mo 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•7mo 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•7mo 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: Solo trader built algo trading platform via AI – no dev experience

https://www.depthsight.pro/
1•DepthSight•55s ago•0 comments

Show HN: Wealth Gap Calculator (Salary vs. Billionaires)

https://wealthgap.lovable.app/
1•ardakaan•56s ago•0 comments

Show HN: Enact – A package manager for AI agent tools

https://enact.tools
1•keithgroves•1m ago•0 comments

I've Never Seen a USB-C Charger This Good [video]

https://www.youtube.com/watch?v=1jAeEPHvDyA
1•ksec•1m ago•0 comments

Growing Up in "404 Not Found" (Part II): The Vanishing Nuclear City

https://substack.com/home/post/p-182824207
1•clacker-o-matic•3m ago•0 comments

Apache Kafka 2025 Wrapped

https://blog.2minutestreaming.com/p/apache-kafka-2025-recap
2•mesto1•4m ago•0 comments

Assessing Public Support for Degrowth

https://www.thelancet.com/journals/lanplh/article/PIIS2542-5196(25)00204-9/fulltext
1•PaulHoule•4m ago•0 comments

Square Face Generator – A Cute Square Face Icon Maker

https://www.squarefacegenerators.com/
1•zittur•4m ago•0 comments

Show HN: Squirreling: a browser-native SQL engine

https://blog.hyperparam.app/squirreling-new-sql-engine-for-web/
1•platypii•4m ago•0 comments

There are broadly two ways people think about AGI and labour

https://twitter.com/sebkrier/status/2005424424254673263
1•cjbarber•5m ago•0 comments

PostNord, Denmark's Main Postal Carrier, Ends Letter Delivery

https://www.nytimes.com/2025/12/30/world/europe/denmark-letter-delivery-postnord-mailboxes.html
2•donohoe•5m ago•1 comments

Show HN: Hacker Book – All the HN Belong to You 2006 – 2025

https://hackerbook.dosaygo.com
1•keepamovin•6m ago•1 comments

SoftBank has completed its $40B investment in OpenAI, CNBC reports

https://www.reuters.com/business/media-telecom/softbank-has-fully-funded-its-40-billion-investmen...
2•ent101•6m ago•0 comments

German Aerospace Engineer Becomes First Wheelchair User to Go to Space

https://mymodernmet.com/first-wheelchairuser-in-space/
1•bookofjoe•7m ago•0 comments

Tamiko Thiel posting a new project emulating ELI5-like Feynman Lectures

https://www.youtube.com/channel/UCZ28Mdx-ewGW1Cvdg3kbs_g
1•killjoywashere•8m ago•1 comments

On Legal AI in 2025

https://theredline.versionstory.com/p/why-cant-43b-in-legal-ai-investment
1•jpbryan•9m ago•0 comments

Meta Buys AI Startup Manus for More Than $2B

https://www.wsj.com/tech/ai/meta-buys-ai-startup-manus-adding-millions-of-paying-users-f1dc7ef8
1•fortran77•12m ago•2 comments

Show HN: Image Gen – 10 AI image providers unified in one Claude Code plugin

https://shipdeckai.github.io/image-gen/
2•merlinrabens•13m ago•1 comments

Show HN: Safi: A "System 2" architecture that gives LLMs a mechanical conscience

https://safi.selfalignmentframework.com
1•jnamaya•13m ago•0 comments

Show HN: Botchat – a privacy-preserving, multi-bot AI chat tool

https://app.botchat.ca/
1•leooodias•13m ago•0 comments

Tech Policy Should Look Like Engineering Requirements

https://howdytx.technology/tech-policy/
2•Ethan_Barry•14m ago•0 comments

Arm Trusted Firmware Bug Bounty Program

https://developer.arm.com/community/arm-community-blogs/b/announcements/posts/arm-launches-a-bug-...
1•hasheddan•14m ago•0 comments

Hy-Motion 1.0: Scaling Flow Matching Models for 3D Motion Generation

https://github.com/Tencent-Hunyuan/HY-Motion-1.0
1•klaussilveira•14m ago•0 comments

Show HN: Brainrot Translator – Convert corporate speak to Gen Alpha and back

https://brainrottranslator.com
1•todaycompanies•16m ago•0 comments

Agent Client Protocol: A protocol for connecting any editor to any agent

https://github.com/agentclientprotocol/agent-client-protocol
3•Lwrless•18m ago•0 comments

Friendly Little Wrapper Types–high value, low cost, just use them

https://v5.chriskrycho.com/journal/friendly-little-wrapper-types/
1•chriskrycho•18m ago•0 comments

SEO Is Great Content

https://misfra.me/2025/best-seo-is-great-content/
1•preetamjinka•18m ago•0 comments

Show HN: Replacing my OS process scheduler with an LLM

https://github.com/mprajyothreddy/brainkernel
1•ImPrajyoth•20m ago•3 comments

Ask HN: What do you use to manage your coding projects?

1•SunshineTheCat•21m ago•0 comments

LeaseGuard: Raft Leases Done Right

https://emptysqua.re/blog/leaseguard-raft-leader-leases-done-right/
1•msaltz•22m ago•0 comments