frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•1y 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•1y 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•1y 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).

Mark

https://colossus.com/article/mark-zuckerberg-profile/
1•Michelangelo11•59s ago•0 comments

Comcast's NBCUniversal cuts streaming technology jobs

https://www.reuters.com/legal/litigation/comcasts-nbcuniversal-cuts-streaming-technology-jobs-202...
1•frank_clover•2m ago•0 comments

AI 'godfather' LeCun has 'zero concerns' about human extinction

https://fortune.com/2026/10/01/ai-godfather-yann-lecun-has-zero-concerns-about-human-extinction-s...
2•Anon84•4m ago•0 comments

Anthropic's super bug-hunting model Mythos is hardcore good at math

https://www.theregister.com/security/2026/10/03/anthropics-super-bug-hunting-model-mythos-is-hard...
1•joebuckwilliams•4m ago•0 comments

Show HN: Clai – featured agentic harness at 10MB, as pkg or CLI

https://github.com/baalimago/clai
1•baalimago•4m ago•0 comments

How to apply to AI safety fellowships (and beyond)

https://www.lesswrong.com/posts/PiP4JqQFKhoqHGG2n/how-to-apply-to-ai-safety-fellowships-and-beyond
2•yarapavan•5m ago•0 comments

Show HN: I indexed court dockets and county liens for every US HOA

https://hoaspy.com
2•lovewins•6m ago•0 comments

The Case for Bringing Your LLMs Home

https://www.wwt.com/blog/bringing-your-llms-home
1•mooreds•6m ago•0 comments

Writing the Cyclone Scheme Compiler

https://justinethier.github.io/cyclone/docs/Writing-the-Cyclone-Scheme-Compiler-Revised-2017
1•fanf2•6m ago•0 comments

Show HN: Claude Mods – Minesweeper

https://github.com/reporails/arcade
1•cleverhoods•8m ago•0 comments

Singapore builds most accurate clock ever, leaves US and China in dust

https://www.scmp.com/news/china/science/article/3369532/david-vs-goliaths-singapore-builds-most-a...
3•ValentineC•9m ago•0 comments

Do Spammers Deserve Death?

https://www.gojiberries.io/do-spammers-deserve-death/
1•speckx•9m ago•1 comments

Ask HN: I have 1 Claude and 2 Codex resets plus credits – help me spend them

1•kurinikku•12m ago•0 comments

Show HN: Automating my 35mm film scanning pipeline

https://shannadige.com/blog/darkroom/
2•shannadige•12m ago•0 comments

When Normal Becomes the Extreme

https://slingingbits.com/when-normal-becomes-the-extreme/
1•awestley•13m ago•0 comments

Show HN: UI for answering agent questions async

https://docs.plannotator.ai/open-source/workflows/questions
2•ramoz•14m ago•0 comments

AI safety is mostly a sex cult in Berkeley, CA [pdf]

https://ams3.digitaloceanspaces.com/urbits3/sitful-hatred/2026.9.24..22.31.54..beb8.51eb.851e.b85...
2•Anon84•18m ago•0 comments

Pyronaut – Pyronaut Blog

https://pyronaut.io/2026/10/02/introducing-pyronaut/
2•rbanffy•24m ago•0 comments

Vx – One Language, Every Chip

https://vxlang.org/
3•elffjs•25m ago•1 comments

Kolibri – Tech Report [pdf]

https://aleph-alpha.com/downloads/tech-report.pdf
2•yu3zhou4•25m ago•0 comments

Koreans Left with Spoiled Food Due to Borked Samsung Firmware Update for Fridges

https://www.techdirt.com/2026/10/02/koreans-left-with-spoiled-food-due-to-borked-samsung-firmware...
2•speckx•26m ago•0 comments

Our Solar System Is Terminally Unstable and Will Be Completely Destroyed

https://www.404media.co/our-solar-system-is-terminally-unstable-and-will-be-completely-destroyed-...
1•croes•26m ago•0 comments

ShinyHunters hacker in FBI data theft detained in Jordan

https://www.reuters.com/world/middle-east/key-shinyhunters-hacker-detained-jordan-is-cooperating-...
2•jbegley•26m ago•0 comments

Tobi Xu – a trilingual GNU/Linux distro for scientists and artists

https://tobixu.xyz/
1•mlmateos•27m ago•0 comments

Modernizing Variolation, Part 2

https://prestonestep.substack.com/p/modernizing-variolation-part-2
1•delton137•29m ago•1 comments

Hacks of 2 federal agencies in a month have spilled a bonanza of sensitive data

https://arstechnica.com/security/2026/10/hacks-of-2-federal-agencies-in-a-month-have-spilled-a-bo...
1•joozio•31m ago•0 comments

Florida AG seeks injunction to hamper OpenAI development

https://www.politico.com/news/2026/09/28/florida-injunction-openai-development-01095061
3•ForHackernews•33m ago•1 comments

Open Source Rust clean-room replacements for 7 of Adobe's apps

https://www.reddit.com/r/SaaS/comments/1wwnhbt/ive_created_open_source_100_rust_cleanroom/
1•wiradikusuma•35m ago•3 comments

Apple removes Bitchat from India app store;Twitter co-founder Jack Dorsey reacts

https://www.livemint.com/technology/apple-removes-bitchat-from-app-store-in-india-twitter-co-foun...
2•thunderbong•37m ago•0 comments

Will A.I. Make Your Brain Lazy? Here's What the New Research Shows

https://www.nytimes.com/interactive/2026/09/29/magazine/ai-chatbots-brain-development-study.html
2•kingcauchy•37m ago•1 comments