frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Cultivating Trust

https://kaeruct.github.io/posts/2026/09/06/conquering-entropy-cultivating-trust/
1•kaeruct•35s ago•0 comments

Two party systems and the quartile voters

https://jslandy.com/two-party-systems-quartile-voters/
1•efavdb•2m ago•0 comments

Industry Standard Tools

https://industrystandard.tools/pending
1•bookofjoe•2m ago•1 comments

Linux support for Apple T1 hardware

https://github.com/standardagents/t1bridge
1•TiredOfLife•5m ago•0 comments

An actual music theory framework with note-for-note voice-leading resolutions

https://www.reddit.com/r/Learnmusic/comments/1vktxsj/the_layout_of_modeschord_swings_in_cmam_w_all/
1•RockofStrength•6m ago•0 comments

Pumpkin: Building a Minecraft server in Rust, First release after 2 years

https://github.com/Pumpkin-MC/Pumpkin
1•alex_medvedev•8m ago•0 comments

Researchers Demonstrate 'Accelerator on a Chip' (2013)

https://www6.slac.stanford.edu/news/2013-09-27-researchers-demonstrate-accelerator-chip
1•consumer451•9m ago•1 comments

The repo market is the 'dark matter' of finance: powerful and perilous

https://www.ft.com/content/8a7e8202-d800-4fb1-a8f0-eeb4536578f7
1•JumpCrisscross•9m ago•0 comments

Show HN: PixelDraw – simple drawing software for web(WASM) and desktop

https://akshy.codeberg.page/pixeldraw/
1•yhska•9m ago•0 comments

Ask HN: So many patterns I know only in theory

1•dakiol•11m ago•1 comments

Show HN: Whatthemovie.com, a movie-still guessing game

https://whatthemovie.com/
1•hivacruz•12m ago•0 comments

Qwen-Scope: Decoding Intelligence, Unleashing Potential

https://qwen.ai/blog?id=qwen-scope
1•Bluestein•17m ago•0 comments

Ignore files in Git without adding them to .gitignore

https://luisdalmolin.dev/blog/ignoring-files-in-git-without-gitignore/
2•Alifatisk•17m ago•0 comments

NetBSD 9.5 released and EOL for NetBSD-9

https://blog.netbsd.org/tnf/entry/netbsd_9_5_released_and
3•jaypatelani•18m ago•0 comments

Show HN: Cucumbero, a(nother) focus timer to help you (well, me) focus (maybe)

https://chromewebstore.google.com/detail/cucumbero/olcepfohjjcdnmejpabcbdbcjbacafea
1•campugnatus•20m ago•0 comments

LeanReact-v0.1: A Lean 4 framework to write web applications

https://github.com/theoriclabs/lean-react
1•hargup•20m ago•0 comments

Want a super power? Ask more questions

https://twitter.com/lemire/status/2096615245900923325
1•tosh•23m ago•0 comments

Mystery Science Theater 3000 foretells artificial sycophancy (1993) [video]

https://www.youtube.com/watch?v=C71Oj68sN5M
1•smorgasborg•24m ago•1 comments

Z1T: Sparse Transformer‑Like Models for Probabilistic Hardware

https://extropic.ai/writing/z1t/
2•mseri•25m ago•0 comments

The Liquid Network (Bitcoin sidechain) is stuck at block 4050335

https://liquid.network/es/block/aad24e4fb64ca8adf4961667da87820cd48e553957ac64e75de7cdb298b5d66b
3•tyfmnfn2gis•25m ago•0 comments

AI Work Simulator

https://runwork.ai/simulate
2•oytuntez•26m ago•1 comments

Ask HN: Why is HN censoring this post about CVE-2026-85046?

1•roschdal•27m ago•0 comments

The Cost of Safetyism

https://www.stevemagness.org/p/the-cost-of-safetyism
2•chriscbr•28m ago•0 comments

How are you finding and managing AI skills?

1•imadtaieber•28m ago•0 comments

Sleeping Through the Night with a Baby

https://larrysalibra.com/sleeping-through-the-night/
1•amin•28m ago•0 comments

They Say I Blog

https://theysayiblog.com/
2•turtleyacht•31m ago•0 comments

Where Responsibility Exists, but Ownership Doesn't

https://medium.com/@gurvinder372/article-6-where-responsibility-exists-but-ownership-doesnt-01e00...
1•gps372•31m ago•0 comments

ESP32 Bit Pirate Hardware Hacking Kit with Web Tools That Speaks Every Protocol

https://geo-tp.github.io/ESP32-Bit-Pirate/
1•geotp•34m ago•1 comments

The AI Bullwhip

https://tomtunguz.com/the-ai-cost-stack/
1•gmays•35m ago•0 comments

Postgres Calculations and the Ambiguity of Null

https://www.crunchydata.com/blog/postgres-calculations-and-the-ambiguity-of-null
2•winslett•37m ago•1 comments
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).