frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Microslop

https://www.s-config.com/microslop/
1•signa11•2m ago•0 comments

Anonymous Chatting App

https://tormessenger.lovable.app
1•genx__•4m ago•0 comments

Japan loses its thirst for vending machines

https://www.ft.com/content/a0e80f5d-4c42-443d-9788-2f9924c774bf
1•petethomas•6m ago•0 comments

Ladybird Browser Is in for a Rusty Future [video]

https://www.youtube.com/watch?v=fXnuR6nXJzc
1•nicoburns•7m ago•0 comments

Twistors and Unification

https://www.math.columbia.edu/~woit/wordpress/
1•gone35•15m ago•0 comments

Ask HN: Can the RAM shortage push personal computing behind forever?

1•rishabhaiover•21m ago•0 comments

Tree style invite systems reduce AI slop

https://abyss.fish/tree-style_invite_systems_reduce_AI_slop
1•y1n0•21m ago•1 comments

Ask HN: Do yall know how to connect Roku remote to fire stick

1•igotdaphone•21m ago•0 comments

Show HN: Internet Speed Limiter – throttle iPhone/iPad network for testing

https://apps.apple.com/us/app/internet-speed-limiter/id6760114671
1•thisisjaymehta•21m ago•0 comments

Rack-Mount Hydroponics

https://sa.lj.am/rack-mount-hydroponics/
4•cdrnsf•29m ago•0 comments

How Discord Stores Trillions of Messages

https://discord.com/blog/how-discord-stores-trillions-of-messages
1•thunderbong•31m ago•0 comments

Robinhood Is Hiring

https://twitter.com/JobsNowPR/status/2032866987815125447
1•qwertyuiop_•32m ago•0 comments

Queueing Theory of Traffic

https://jslandy.com/traffic-queue/
3•efavdb•37m ago•0 comments

OpenMW Xbox-UI Fork

https://ilikegothmommys.gitlab.io/openmw-xbox/
1•Acrobatic_Road•43m ago•0 comments

Free Iran War Monitor

https://iran.airealist.org/
1•msukhareva•46m ago•0 comments

This 18 year old has 12 $200 Codex Plans

https://www.youtube.com/watch?v=i4TBE3Et3I8
1•kshri24•51m ago•0 comments

Nvidia Is Planning to Launch an Open-Source AI Agent Platform

https://www.wired.com/story/nvidia-planning-ai-agent-platform-launch-open-source/
1•umangsehgal93•58m ago•0 comments

EA Lays Off Staff Following Record-Breaking Battlefield 6 Launch

https://www.ign.com/articles/ea-lays-off-staff-across-all-battlefield-studios-following-record-br...
1•andrekandre•1h ago•0 comments

Paper: AI models are faking their step by step thinking

https://twitter.com/thetripathi58/status/2032775838329090191
2•MrBuddyCasino•1h ago•0 comments

Dreamfarm product copied by large competitors

https://www.news.com.au/lifestyle/home/interiors/ripped-off-kmart-slammed-for-unaustralian-act/ne...
1•asdefghyk•1h ago•1 comments

Revanced Manager v2

https://revanced.app/announcements?id=20-release-of-revanced-manager-v2
2•super256•1h ago•0 comments

Show HN: Nimhuml – A Nim parser and serializer for HUML

https://github.com/w3Abhishek/nimhuml
1•w3abhishek•1h ago•0 comments

Young people are turning to old-school hobbies to get off their phones

https://apnews.com/article/old-school-hobbies-vintage-analog-grandma-e45fa11ae1422715b6a254004476...
7•1vuio0pswjnm7•1h ago•0 comments

Epic – a visual design editor with a built-in visual sitemap builder

https://no-edit.lovable.app/
1•theme-man•1h ago•3 comments

Show HN: An experiment in giving coding agents long-term memory

1•yacc2•1h ago•0 comments

A most elegant TCP hole punching algorithm

https://robertsdotpm.github.io/cryptography/tcp_hole_punching.html
2•Uptrenda•1h ago•0 comments

S&P 500 Concentration Approaching 50%

https://www.apolloacademy.com/sp-500-concentration-approaching-50/
4•toomuchtodo•1h ago•1 comments

How compilers should evolve in the era of LLM coding

https://twitter.com/ezyang/status/2032932628131721462
1•mfiguiere•1h ago•0 comments

FCC Chair Threatens to Revoke Broadcasters' Licenses over War Coverage

https://www.nytimes.com/2026/03/14/world/middleeast/fcc-broadcasters-iran-war.html
14•KnuthIsGod•1h ago•2 comments

I Asked 4 AI Models to Research the Parasite Cleanse Hype

https://christiantech.substack.com/p/i-asked-4-ai-models-to-research-the
1•snow_mac•1h ago•0 comments