frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•6mo 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•6mo 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•6mo 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).

Ask HN: Why does every B2B SaaS have to look like Linear/Stripe?

1•PaulShin•1m ago•0 comments

Package Manager Design Tradeoffs

https://nesbitt.io/2025/12/05/package-manager-tradeoffs.html
1•todsacerdoti•3m ago•0 comments

Is Pixelfed sawing off the branch that the Fediverse is sitting on?

https://ploum.net/2025-12-04-pixelfed-against-fediverse.html
1•8organicbits•4m ago•0 comments

Grok 4.20 tops alpha arena trading benchmark

https://nof1.ai/leaderboard
1•knuppar•5m ago•0 comments

Show HN: I built a local-first URL redirector to stop doomscrolling

https://github.com/jordanblakey/url-redirector
1•jordan_blakey•6m ago•1 comments

Girls and boys solve math problems differently – with similar short-term results

https://theconversation.com/girls-and-boys-solve-math-problems-differently-with-similar-short-ter...
1•nradov•13m ago•1 comments

Flow Control: a programmer's text editor

https://flow-control.dev/
2•signa11•20m ago•0 comments

Coverd – gambling with your credit card purchases

https://www.coverd.us/about
1•smsm42•21m ago•0 comments

AI is mastering language. Should we trust what it says? (2022)

https://www.nytimes.com/2022/04/15/magazine/ai-language.html
2•maxutility•22m ago•0 comments

Pdsink: USB Power Delivery Sink library for embedded devices

https://github.com/pdsink/pdsink
1•zdw•30m ago•0 comments

Scientists Link Popular Sugar Substitute (Sorbitol) to Liver Disease

https://scitechdaily.com/scientists-link-popular-sugar-substitute-to-liver-disease/
3•mraniki•34m ago•0 comments

'The time has come to declare war on AI'

https://www.sfgate.com/tech/article/time-to-declare-war-ai-21221535.php
5•MilnerRoute•37m ago•0 comments

Trying VLLM Ideas on Apple Silicon with MLX (WIP)

https://github.com/waybarrios/vllm-mlx
1•waybarrios•41m ago•1 comments

AI Structural Redesign Proven on Gemini/Copilot

https://imgur.com/a/A8x18kc
1•korea_koh•41m ago•1 comments

Show HN: GitHired – Find Your Next 10x Engineer

https://www.githired.tech
4•raghavbansal11•54m ago•11 comments

Why Does A.I. Write Like That?

https://www.nytimes.com/2025/12/03/magazine/chatbot-writing-style.html
1•gmays•55m ago•0 comments

Rio de Janeiro's talipot palm trees bloom for the first and only time

https://en.jardineriaon.com/The-talipot-palm-trees-of-Rio-de-Janeiro-bloom-for-the-first-and-only...
2•1659447091•1h ago•0 comments

Show HN: TestPlanit – an open-source test case management system built for QA

https://demo.testplanit.com/en-US/signin
1•therealbrad•1h ago•0 comments

Bad Boy for Life: Sean Combs' History of Violence

https://www.rollingstone.com/music/music-features/diddy-friends-bad-boy-artists-abuse-violence-12...
1•handfuloflight•1h ago•0 comments

Platonic space: where cognitive and morphological patterns come from

https://thoughtforms.life/platonic-space-where-cognitive-and-morphological-patterns-come-from-bes...
1•andsoitis•1h ago•0 comments

Ask HN: What do you usually do while waiting for AI responses?

2•alfred_chang•1h ago•4 comments

Control-Alt-Delete of a Life – By Steven K Roberts

https://nomadicresearchlabs.substack.com/p/control-alt-delete-of-a-life
1•pkaeding•1h ago•0 comments

Japan protests after Chinese military aircraft locks its radar on Japanese jets

https://apnews.com/article/japan-china-military-fighter-jets-pacific-25017ddbec3afd6bf9e6da4b8516...
3•c420•1h ago•0 comments

Discovering the Indieweb with Calm Tech

https://alexsci.com/blog/calm-tech-discover/
5•todsacerdoti•1h ago•0 comments

Deconstructing Dollar Dynamics: A State-Dependent,Non-Linear Integrated Equation

https://zenodo.org/records/17790383
1•truongthanminh•1h ago•1 comments

Apple Is Experiencing Its Biggest Leadership Exodus

https://fortune.com/2025/12/05/apple-executive-leadership-exodus-biggest-shakeup-since-steve-jobs...
4•ent101•1h ago•0 comments

Anatomy of a Domain Risk Engine: Regex vs. LLMs

https://www.urlert.com/blog/anatomy-domain-risk-engine-regex-llm
1•tomerhe•1h ago•1 comments

SC sheriff's office quoted me $9k for a simple Flock records request

https://columbiamuckraker.substack.com/p/sc-sheriffs-office-quoted-me-9000
4•sc_muckraker•1h ago•2 comments

Z2 – Lithographically fabricated IC in a garage fab

https://sam.zeloof.xyz/second-ic/
37•embedding-shape•1h ago•3 comments

AstoCAD – Polished, paid "soft-fork" of FreeCAD with upstream contributions

https://www.astocad.com/
1•embedding-shape•1h ago•0 comments