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

Show HN: A lunisolar calendar with equinox-decided leap months, in one .js file

https://carpocratian.org/en/church/calendar/
1•flammafex•2m ago•0 comments

Don't expect supersize profits from Anthropic any time soon

https://www.economist.com/business/2026/10/26/dont-expect-supersize-profits-from-anthropic-any-ti...
1•Anon84•2m ago•0 comments

Things to Think About Post-Election (US)

https://movementvoterproject.substack.com/p/top-10-things-to-think-about-postelection
1•verdverm•6m ago•0 comments

Shanghai SME subsidies: free English checklist of 9 official sites

https://shituapp.com/dot/en/checklist.html
1•subsidyradar•7m ago•0 comments

(VCF Midwest 2026) Building a Living 90s Internet for Vintage Computers [video]

https://www.youtube.com/watch?v=mZfJ-sulqQs
1•CursedSilicon•7m ago•0 comments

Show HN: Sping – A modern, multi-target network diagnostic tool written in Rust

https://github.com/LambdaBytes/sping
1•lambdabytes•10m ago•0 comments

James Pond 2: Codename RoboCod – Recompiled

https://github.com/griches/JamesPond2RobocodRecomp
1•doener•12m ago•0 comments

Star Trek actor Walter Koenig, who played Pavel Chekov, dies aged 90

https://www.bbc.com/news/articles/cv0ldjzg9xppo
3•Archelaos•13m ago•0 comments

Pilcrow's Auth Book

https://auth.pilcrowonpaper.com
1•thunderbong•14m ago•0 comments

Show HN: Live speech-to-text on an ESP32-P4 microcontroller, no cloud

https://github.com/BoumedineBillal/esp32-pie-asr
1•boumedinebillal•15m ago•0 comments

How does this even work

2•nexisshop•16m ago•0 comments

JWST and ALMA reveal a dusty, rapidly growing black hole in the early universe

https://phys.org/news/2026-10-jwst-alma-reveal-dusty-rapidly.html
1•wglb•21m ago•0 comments

Southern Africa's first known stenciled rock art found hiding in plain sight

https://phys.org/news/2026-10-southern-africa-stenciled-art-plain.html
2•wglb•22m ago•0 comments

Show HN: Better Design – alternative to Claude Design, for any coding agents

https://better-design.com
1•marvinkr•24m ago•0 comments

About the compromised eMudhra intermediate CAs (Published Date: 2026-10-23)

https://support.apple.com/en-us/149555
1•DASD•26m ago•0 comments

Evolving a Live Game Engine: Introducing ECS Without a Full Rewrite [video]

https://www.youtube.com/watch?v=Q4490CzX_ag
1•zhorov10000•28m ago•1 comments

Cooks – open-source sales engagement (sequences, parallel dialer, MCP)

https://cooks-sales.vercel.app
1•beargrizzzy•34m ago•0 comments

Show HN: Shittyscreenshares.com

https://shittyscreenshare.com/
2•Sean-Der•38m ago•0 comments

Some cybersecurity x AI dichotomies

https://cje.io/2026/10/26/some-cyber-ai-dichotomies/
1•caseyjohnellis•39m ago•0 comments

AI talk has nearly doubled outside tech. Proof of payoff is still rare

https://equibles.com/research/ai-talk-has-nearly-doubled-outside-tech-proof-of-payoff-is-still-rare
2•daniel3303•40m ago•0 comments

Show HN: Rethink, a prisoner's dilemma tournament you can enter in plain English

https://rethink.asilentpond.com/
1•ducklin404•43m ago•0 comments

Flint is an open-weight mixture-of-experts model from Recursive

https://openrouter.ai/recursive/flint-v1.0:free
1•doener•45m ago•0 comments

The $2k php2shell Challenge Was Unexploitable [video]

https://www.youtube.com/watch?v=VhNiMWtOutw
1•marvinborner•46m ago•0 comments

NDCG Is Overrated (2023)

https://softwaredoug.com/blog/2023/05/06/ndcg-is-overrated
1•softwaredoug•48m ago•0 comments

Heavenly delights of hashing numbers under EQUALP

https://turtleware.eu/posts/Heavenly-delights-of-hashing-numbers-under-EQUALP.html
1•ibobev•48m ago•0 comments

Software stack is an abstraction made for humans. AI can skip it

https://vithushansylvester.com/writing/what-is-left-when-the-programmer-is-not-human
2•hacker_v_s•48m ago•0 comments

Pharo – A pure object-oriented programming language and a powerful environment

https://pharo.org/
1•ibobev•49m ago•0 comments

Tinfoil – Less Is More: From 1M Lines of Firmware to 300 of Assembly

https://tinfoil.sh/blog/2026-10-25-less-is-more
1•ibobev•50m ago•0 comments

Therightaimodel

https://www.therightaimodel.com/
1•ayaan-ipa•57m ago•1 comments

Caveats of iPad Mini

https://www.brachkow.com/notes/caveats-of-ipad-mini/
1•brachkow•1h ago•0 comments