frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

Is LinkedIn Entering Its Post-Cringe Era?

https://www.nytimes.com/2026/06/04/business/linkedin-social-media-influencers.html
1•1vuio0pswjnm7•2m ago•1 comments

Show HN: Laravel Octane Benchmark (Swoole, RoadRunner, FrankenPHP)

https://terrylinooo.github.io/laravel-octane-benchmark/
1•terrylinooo•5m ago•0 comments

Unicode Fonts and Tools for X11

https://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html
1•kristianp•6m ago•0 comments

Jo – Secure Programming for the AI Era

https://jo-lang.org/blog/2026-06-04-introducing-jo.html
1•rguiscard•8m ago•0 comments

Easy Writer: On Ted Geltner's Biography of Denis Johnson

https://www.metropolitanreview.org/p/easy-writer
1•benbreen•9m ago•0 comments

In a First, Scientists Precisely Edit Human Embryo Genes

https://www.nytimes.com/2026/06/04/science/embryos-gene-editing-crispr.html
1•bonsai_spool•10m ago•0 comments

Show HN: Bonsai –- Using agentic AI / browser / memory to replace ChatGPT

https://drive.google.com/drive/folders/1YUQ3tmcBSLEyBKLi5JdJgmod9mqXFTgl
1•coolwulf•13m ago•0 comments

US adult cigarette smoking rate hits another all-time low

https://apnews.com/article/adult-smoking-cigarette-decline-survey-3dfc9d82fcc106e49a5706819d438239
5•paulpauper•15m ago•0 comments

The small businesses trying to prop up the tandem bike industry

https://thehustle.co/newsletters/03-06-2026
1•paulpauper•18m ago•0 comments

Show HN: A simpl bookmark manager for Mac and iOS

https://bendansby.com/apps/markwell.html
1•webwielder2•19m ago•0 comments

Does banking consolidation harm households?

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6851099
1•paulpauper•20m ago•0 comments

Meta enables adb on deprecated Portal devices

https://fb.watch/HxPu0fSyeH/
10•jenders•20m ago•1 comments

Identity Access is not just for technical people

https://pathros.cc/local/
1•dominiconwuka•21m ago•1 comments

Medicare to launch weight loss drug option in July with $50 copay

https://www.npr.org/2026/05/06/nx-s1-5812662/medicare-bridge-glp1-drugs-copay
2•JumpCrisscross•27m ago•0 comments

3ds-CLI, full Linux env on a Nintendo 3ds using RISC V emulation

https://github.com/cmdada/3DS-CLI
2•cmdada•27m ago•1 comments

Americans on GLP-1s Are Overwhelming Retailers with Their Nonstop Returns

https://www.wsj.com/business/retail/americans-on-glp-1s-are-overwhelming-retailers-with-their-non...
2•JumpCrisscross•29m ago•0 comments

Amber Tree: A Middle Ground Between Rowan Red and Green Trees

https://blog.gplane.win/posts/introducing-amber-tree.html
2•gplane•30m ago•0 comments

Consciousness Atlas – 325 theories of consciousness

https://www.consciousnessatlas.com/
1•maebert•31m ago•1 comments

Sites for free transparent PNG assets (no signup, no watermark)

https://wowpng.com/
1•kanlabs•33m ago•0 comments

Software Has Long Been Beyond Our Understanding

https://kylemcgough.com/blogs/software-has-long-been-beyond-our-understanding
1•sosodev•35m ago•0 comments

Yon – a topos-oriented language with a content-addressed lattice heap

https://yon-lang.org/
1•amenn•36m ago•0 comments

Show HN: LLMhop – A tiny, stateless router for LLMs with a NixOS module

https://github.com/mirkolenz/llmhop
1•mlenz•38m ago•0 comments

Marketing Cygnus Support – Free Software History

http://www.toad.com/gnu/cygnus/
2•njn•39m ago•0 comments

Show HN: ControllerTest-test gamepads,stick drift and polling rate by browser

https://controllertestonline.com/
1•zylics•43m ago•0 comments

QUIC (Quick UDP Internet Connections) Transport Layer Network Protocol

https://en.wikipedia.org/wiki/QUIC
3•Brysonbw•44m ago•2 comments

Only favors Indian-origin candidates: Chinese-American professor sues Texas univ

https://www.msn.com/en-in/news/world/only-favors-indian-origin-candidates-chinese-american-profes...
4•alecco•50m ago•0 comments

Lessons from building Claude Code: How we use skills

https://claude.com/blog/lessons-from-building-claude-code-how-we-use-skills
1•geoffbp•55m ago•0 comments

Jared Diamond's Collapse, Chaco Canyon, Why Agency Matters to Understand History

https://greysidewalk.substack.com/p/jared-diamonds-collapse-chaco-canyon
3•pseudolus•58m ago•0 comments

Disprove – a backtest auditor that rejected my own strategy

https://github.com/866y4tb8hc-coder/disprove
1•movadims•59m ago•0 comments

Alibaba/Open-Code-Review

https://github.com/alibaba/open-code-review
2•geoffbp•1h ago•0 comments