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

How much AI can a maintainer get away with using without losing their humanity?

https://www.jvt.me/posts/2026/08/02/ai-maintainer/
1•zdw•2m ago•0 comments

My Personal Software Journey: Self-Hosting Agent-Built Apps on a Mac Mini

https://metedata.substack.com/p/016-my-personal-software-journey
1•young_mete•7m ago•0 comments

I ran a 1998 artificial life SIM at 560x speed and caught a rare easter egg [video]

https://www.youtube.com/watch?v=e5GRwnCE2Y0
1•robinduckett•8m ago•0 comments

How AI is expanding what people do at work

https://openai.com/index/how-ai-is-expanding-what-people-do-at-work/
2•gmays•10m ago•0 comments

Show HN: Testimonials.Free ~1 KB embed widget, zero layout shift

https://testimonials.free/
1•nadermx•19m ago•0 comments

Flock – Chilling Effects: Long Island's Emerging Open-Air Prison

https://www.11971.com/
2•mediaeater•20m ago•0 comments

Dan, a compression toolkit for anime line art with honest benchmarks

https://github.com/adnqcr7-code/Data-Adaptive-Network
1•kairos_agent•21m ago•0 comments

NY files $36B lawsuit against Kalshi, alleging illegal gambling operation

https://www.nbcsports.com/nfl/profootballtalk/rumor-mill/news/new-york-files-36-billion-lawsuit-a...
4•randycupertino•21m ago•1 comments

Do not trust the marketing IOPS on Consumer SSD

https://bsid.io/writing/the-ssd-that-cried-etcd
1•humbfool2•22m ago•0 comments

Let kids be kids: When collectibles lose their playfulness

https://quarters.captaintouch.com/blog/posts/2026-08-02-let-kids-be-kids:-when-collectibles-lose-...
1•capitain•24m ago•0 comments

Google Removes New Earth AI Tool a Day After Users Create Fake Disasters

https://deltiasgaming.com/google-removes-new-earth-ai-tool-a-day-after-users-create-fake-disasters/
2•randycupertino•32m ago•2 comments

Recovering a SM T225N and Overclocking Its PowerVR Rogue GE8320

https://xdaforums.com/t/recovering-a-hard-bricked-galaxy-tab-a7-lite-with-only-a-phone-github-cod...
1•kirito1337•32m ago•0 comments

Show HN: Rubiks Cube Solver

https://github.com/punnerud/MPErubiks
1•punnerud•33m ago•0 comments

Should You Use AI for a Task?

https://elezea.com/2026/08/should-you-use-ai-for-a-task-heres-a-simple-way-to-decide/
3•conqrr•34m ago•0 comments

The Quest to Track Down Every Official Liberty Bell Replica Created by Congress

https://tomlovesthelibertybell.com/the-57-u-s-treasury-liberty-bell-replica-locations/
1•gscott•36m ago•0 comments

I built a prompt injection detector using only Go's standard library

https://towardsdev.com/i-built-a-prompt-injection-detector-using-gos-standard-library-f4528c13d03...
1•cheikhdev•36m ago•0 comments

Understanding Raft Leader Election by building from scratch

https://sushantdhiman.dev/blog/raft/
1•birdculture•40m ago•0 comments

Show HN: I implemented the Kimi K3 paper from scratch in PyTorch

https://github.com/TimRots/kimi3
4•ENOMEM•41m ago•0 comments

WireguardTCP: WireGuard over TCP

https://wireguardtcp.net/
11•kaliszad•41m ago•4 comments

What Is Decispher?

2•cool_coder12•43m ago•1 comments

Tell HN: On the Boardwalk

3•kmstout•44m ago•0 comments

Design by Contract and effects are essential for LLM-generated code

https://gavinray97.github.io/blog/design-by-contract-and-effects-for-llms
1•gavinray•45m ago•0 comments

Hyper-Reality (2016)[video]

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

Eating less protein could slow aging, major review finds

https://www.sciencedaily.com/releases/2026/08/260801042811.htm
3•OutOfHere•48m ago•3 comments

Maximum Overkill

http://www.os2museum.com/wp/maximum-overkill/
1•userbinator•49m ago•0 comments

Bubble Memory

https://en.wikipedia.org/wiki/Bubble_memory
8•jacquesm•1h ago•0 comments

Show HN: Draco – A single-binary, self-hostable Firecrawl alternative in Rust

https://github.com/0xchasercat/draco/
9•ccheshirecat•1h ago•1 comments

AI Mania: From Tulips to Tokens

https://seanhelvey.com/tools-and-their-tools/
34•Lambda11•1h ago•22 comments

Estimating Fable and Sol model sizes

https://twitter.com/anpaure/status/2083993647268405602
7•grahamsfde•1h ago•0 comments

EU Age Verification Project Mandates Hardware-Bound Attestation

https://linuxiac.com/eu-age-verification-project-mandates-hardware-bound-attestation/
26•RobotToaster•1h ago•10 comments