frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Calico Basin Scrambling

https://xorvoid.com/2026_01_calico_basin_scrambling.html
1•ibobev•36s ago•0 comments

Time in C++: C++20 Brought Us Time Zones

https://www.sandordargo.com/blog/2026/01/21/clocks-part-8-cpp20-timezones
1•ibobev•58s ago•0 comments

FoundationDB's versionstamps should be everywhere

https://fragno.dev/blog/versionstamps
1•WilcoKruijer•2m ago•0 comments

Show HN: YOLO-cage – AI coding agents that can't exfiltrate secrets

https://github.com/borenstein/yolo-cage
1•borenstein•3m ago•0 comments

Everything Gen Z needs to know about the 2025 tech landscape

https://stackoverflow.blog/2026/01/14/gen-z-wrapped-2025/
1•BerislavLopac•4m ago•0 comments

Show HN: I made a roguelike game playable over SSH

https://dev-dungeon.com
1•viiralvx•4m ago•0 comments

Scott Bessent calls Denmark "irrelevant", is not concerned by Treasury sell-off

https://www.cnbc.com/2026/01/21/bessent-davos-denmark-greenland-treasuries.html
1•maxloh•5m ago•0 comments

100x a Business with AI

https://twitter.com/vasuman/status/2010473638110363839
1•gmays•5m ago•0 comments

libcurl memory use some years later

https://daniel.haxx.se/blog/2026/01/21/libcurl-memory-use-some-years-later/
3•TangerineDream•7m ago•0 comments

The Oligarchs Pushing for Conquest in Greenland

https://newrepublic.com/article/205102/oligarchs-pushing-conquest-greenland-trump
2•afavour•8m ago•0 comments

The Confabulations of Oliver Sacks

https://nautil.us/the-confabulations-of-oliver-sacks-1262447/
2•bookofjoe•9m ago•1 comments

Cognitive Collapse: A First Reconnaissance

https://www.ecosophia.net/cognitive-collapse-a-first-reconnaissance/
1•bediger4000•9m ago•0 comments

Alex Honnold did a trial climb up 101 today. Thoughts?

https://old.reddit.com/r/Taipei/comments/1qhxtk7/alex_honnold_did_a_trial_climb_up_101_today/
2•keepamovin•9m ago•0 comments

Show HN: AI 3D Camera:Transform Any Photo into a Professional Photography Studio

https://ai3dcamera.com/
1•dond1986•10m ago•0 comments

Show HN: See the carbon impact of your cloud as you code

2•hkh•13m ago•0 comments

Agentic AI and the Mythical Agent-Month

http://muratbuffalo.blogspot.com/2026/01/agentic-ai-and-mythical-agent-month.html
1•vinhnx•15m ago•0 comments

Tree CLI's plain text secrets

https://w.willx86.com/2026/01/21/tree-secrets.html
1•willx86•16m ago•0 comments

Memory supply shortfall will cause chip shortage to spread to other segments

https://www.tomshardware.com/pc-components/ram/data-centers-will-consume-70-percent-of-memory-chi...
2•walterbell•16m ago•0 comments

A Lifetime of Service

https://olly.world/a-lifetime-of-service
2•lylo•16m ago•1 comments

Show HN: An open source "Cursor for Google Sheets" with conversation memory

https://github.com/Ai-Quill/ai-sheeter
1•tuantruong•16m ago•0 comments

GongU

https://gongu.xyz
1•dwk601•17m ago•0 comments

So, why *should* GNOME support server side decorations?

https://blister.zip/posts/gnome-ssd/
1•todsacerdoti•17m ago•1 comments

YC Spring – Full-Stack AI Consulting Company

1•latmba06•17m ago•0 comments

Computational model discovers new types of neurons hidden in decade-old dataset

https://bigthink.com/neuropsych/computational-model-discovers-new-types-of-neurons-hidden-in-deca...
1•Brajeshwar•19m ago•0 comments

Webb reveals a planetary nebula with clarity, and it is spectacular

https://arstechnica.com/space/2026/01/webb-has-given-us-with-a-stunning-new-view-of-a-well-known-...
2•Brajeshwar•19m ago•0 comments

From Veritasium: What If You Keep Slowing Down?

https://www.media.mit.edu/articles/veritasium-what-if-you-keep-slowing-down/
1•Brajeshwar•19m ago•0 comments

Amazon shopping automation without vision: verification gate+local model (3B)

1•tonyww•20m ago•1 comments

Tell HN: The FAA is pushing to decimate small flight schools

2•salusinarduis•21m ago•2 comments

Show HN: Everpath – Goal planning via natural language roadmaps

https://www.everpath.app/
1•sweave•21m ago•0 comments

DOGE Employees Shared Social Security Data

https://www.nytimes.com/2026/01/20/us/politics/doge-employees-social-security-data.html
3•insane_dreamer•22m ago•1 comments