frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Chess960v2 – Latest benchmark results, first championship launch coming soon

https://chess960v2.com/en
1•lavren1974•1m ago•0 comments

The Emoji Museum

https://emojistime.com/museum
1•kilroy123•1m ago•0 comments

The Last People Before the Internet: Revisiting the AOL Instant Messenger Era

https://kneelingbus.substack.com/p/the-last-people-before-the-internet
1•thinkingemote•2m ago•0 comments

Ask HN: What CSS do I miss in 2025?

1•sawirricardo•3m ago•0 comments

Back Pain (2021)

https://www.thomas-huehn.com/back-pain/
1•Tomte•4m ago•0 comments

Improved My Feedreader's Writing to the Web

https://www.zylstra.org/blog/2025/12/improved-my-feedreaders-writing-to-the-web/
1•todsacerdoti•5m ago•0 comments

Vulkan-based translation layer for Direct3D 7 on Linux, D7VK has a 1.0 release

https://www.gamingonlinux.com/2025/12/vulkan-based-translation-layer-for-direct3d-7-on-linux-d7vk...
1•retro_guy•8m ago•0 comments

Llmedge an on device LLM, vision, and speech inference library for Android

https://github.com/Aatricks/llmedge
1•aatricks•8m ago•1 comments

Show HN: Skyz AI – Host, Deploy and Use MCP Servers with Ease

https://skyz.ai
1•Elemenopi•8m ago•0 comments

Elon Musk just hit Sam Altman with an $800B counterpunch

https://www.businessinsider.com/spacex-valuation-elon-musk-sam-altman-openai-rivalry-2025-12
1•ashishgupta2209•9m ago•0 comments

Florian Cassayre

https://florian.cassayre.me/
1•conferza•10m ago•0 comments

When Marketing Exceeds the Age of the Universe

https://storagemath.com/posts/cloudian-26-nines-absurdity/
1•maxicohen•14m ago•0 comments

The Evolution of Cooperation [pdf]

https://ee.stanford.edu/~hellman/Breakthrough/book/pdfs/axelrod.pdf
1•polivier•14m ago•0 comments

Acme Device Attestation Extension

https://datatracker.ietf.org/doc/draft-ietf-acme-device-attest/
1•todsacerdoti•17m ago•0 comments

Is it time to redraw our maps?

https://www.theguardian.com/books/2025/dec/14/is-it-time-to-redraw-our-maps
1•n1b0m•17m ago•1 comments

Show HN: TheAuditor – I indexed my code into SQLite to stop AI hallucinations

https://github.com/TheAuditorTool/Auditor
2•TheAuditorTool•19m ago•1 comments

Steve Eisman is cautious about LLMs, influenced by Gary Marcus

https://www.youtube.com/watch?v=wSJMtTETOv8
1•jadelcastillo•20m ago•0 comments

The Fatal "Hotwire": Deconstructing Cloudflare's 2025 Architectural Meltdown

https://medium.com/@acmerfight/the-fatal-hotwire-the-architectural-gamble-behind-cloudflares-extr...
2•acmerfight•22m ago•1 comments

Claude in a Game Theory Tournament

https://matthodges.com/posts/2025-12-14-claude-axelrod-prisoners-dilemma/
1•m-hodges•24m ago•0 comments

How Did the CIA Lose a Nuclear Device in the Himalayas?

https://www.nytimes.com/interactive/2025/12/13/world/asia/cia-nuclear-device-himalayas-nanda-devi...
2•Anon84•24m ago•0 comments

Show HN: 999 Penguins

https://999penguins.com
4•learntocode222•25m ago•0 comments

If you truncate a UUID I will truncate your fingers

https://gieseanw.wordpress.com/2025/12/14/if-you-truncate-a-uuid-i-will-truncate-your-fingers/
2•andyg_blog•25m ago•1 comments

Velato Hands-Free: Write JavaScript by Whistling

https://velato.net/HandsFree/
1•xpointer•26m ago•0 comments

Bird Game 3 – Online trend or marketing genius?

2•SergiuNistor•27m ago•2 comments

Show HN: 0xFeed – An AI filter to remove SEO spam and fluff from tech news

https://www.0xfeed.dev/
1•giovanella•28m ago•1 comments

Show HN: I built a tool that converts plain language into AI video prompts

https://www.movyolabs.com
1•Nair0•32m ago•0 comments

Pydantic resolve v2: assemble complex nested data with minimal cost

https://allmonday.github.io/pydantic-resolve/introduction/
1•tank-34•36m ago•0 comments

What would a real Limitless pill do?

https://neuroshift.club/blog/designing-limitless-pill-specification
2•heliosinc•41m ago•0 comments

Apple Maps claims it's 29,905 miles away

https://mathstodon.xyz/@dpiponi/115651419771418748
33•ColinWright•41m ago•17 comments

PageFlow – The ultra-minimalist, native macOS PDF reader

https://pageflow.pinchen.me/
2•pinchen147•41m ago•3 comments