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: Made a quick tool to test controller stick sensitivities and curves

https://gamepadtuner.com
1•ridwanc•47s ago•0 comments

Database Anonymiser

https://github.com/mnnayeck/db-anonymiser
1•nmnayeck•1m ago•1 comments

Ask HN: ArXiv Endorsement as Independent Researcher

1•7777777phil•3m ago•0 comments

CodeClash

https://codeclash.ai/
1•falcor84•4m ago•0 comments

Show HN: LogDeck – Container management and logs viewer for self-hosters

https://github.com/AmoabaKelvin/logdeck
1•KelvinAmoaba•7m ago•0 comments

How to Identify AI-Written Web Fiction

https://recordcrash.substack.com/p/how-to-identify-ai-written-web-fiction
1•networked•8m ago•0 comments

What happens when the coding becomes the least interesting part of the work

https://obie.medium.com/what-happens-when-the-coding-becomes-the-least-interesting-part-of-the-wo...
2•avivby•9m ago•0 comments

How to Launch on Hacker News (2012) [video]

https://www.youtube.com/watch?v=KjbQU6LmZzQ
1•ensocode•13m ago•0 comments

Is it just me or is fedora becoming mainstream

https://old.reddit.com/r/Fedora/comments/1pkk5k8/is_it_just_me_or_is_fedora_becoming_mainstream/
1•sipofwater•17m ago•0 comments

Programmer Network Platform

https://programmer.network
1•agjs•18m ago•0 comments

Installing Every NixOS Package

https://unnamed.website/posts/installing-every-nixos-package/
1•OuterVale•22m ago•0 comments

Ask HN: What is Fullstack Engineering?

1•grandimam•25m ago•0 comments

Algorithms do widen the divide: Social media feeds shape political polarization

https://english.elpais.com/technology/2025-11-27/algorithms-do-widen-the-divide-social-media-feed...
2•PaulHoule•26m ago•0 comments

Atlassian Security Bulletin – December 11 2025

https://confluence.atlassian.com/security/security-bulletin-december-11-2025-1689616574.html
1•gjvc•28m ago•0 comments

Southeast Asia seeks its place in space

https://www.technologyreview.com/2025/12/12/1129235/dispatch-thai-space-expo-southeast-asia-explo...
1•fleahunter•30m ago•0 comments

Gitlantis: Drive a boat through your codebase in 3D

https://marketplace.visualstudio.com/items?itemName=brian-njogu.gitlantis
1•summarity•31m ago•0 comments

Tricking a Security AI agent into pwning itself

https://www.hacktivesecurity.com/blog/2025/12/10/cve-2025-67511-tricking-a-security-ai-agent-into...
1•edoardottt•35m ago•0 comments

Ask your LLM for receipts: What I learned teaching Claude C++ crash triage

http://addxorrol.blogspot.com/2025/12/ask-your-llm-for-receipts-what-i.html
1•tdullien•37m ago•0 comments

Adopt Unicode Characters

https://aac.unicode.org/adopt
1•selvan•38m ago•0 comments

US threatens new ICC sanctions unless court pledges not to prosecute Trump

https://www.reuters.com/world/us/us-threatens-new-icc-sanctions-unless-court-pledges-not-prosecut...
10•jeroenhd•39m ago•0 comments

The most performant, secure, scalable, reliable, freest data platform

https://averagedatabase.com
1•tamnd•39m ago•0 comments

Simplify GPU Programming with Nvidia CUDA Tile in Python – Nvidia Technical Blog

https://developer.nvidia.com/blog/simplify-gpu-programming-with-nvidia-cuda-tile-in-python/
2•rbanffy•41m ago•0 comments

Hogwarts Legacy is free on the Epic Games Store for a limited time

https://www.windowscentral.com/gaming/hogwarts-legacy-epic-games-store-freebie-the-game-awards-20...
1•cyrc•43m ago•0 comments

Explaining Christmas to developers as a system architecture story

1•frafdez•50m ago•0 comments

Show HN: Workmux – Parallel development in tmux with Git worktrees

https://github.com/raine/workmux
2•rane•51m ago•0 comments

Native ads coming soon to Stack Overflow and Stack Exchange

https://meta.stackexchange.com/questions/415259/native-ads-coming-soon-to-stack-overflow-and-stac...
6•exploraz•52m ago•7 comments

How does a "you interview for US company, we do the work" scam work?

8•marttilaine•59m ago•8 comments

Show HN: AI Advent Calendar – 25 practical AI tips for small business owners

https://advent.abasis.ai
2•akimov_pro•1h ago•0 comments

We're launching Bindu, a simple way to connect AI agents

https://github.com/GetBindu/Bindu
1•ai_biden•1h ago•6 comments

After 27 years within budget Austria open 6thlongest railway tunnel in the world

https://infrastruktur.oebb.at/en/projects-for-austria/railway-lines/southern-line-vienna-villach/...
4•fzeindl•1h ago•0 comments