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

Show HN: Vieta Space, a visual LaTeX math editor

https://docs.vietaspace.com/guide/features
1•liamhawtin•42s ago•0 comments

'Alan's Universe' Shows What It Might Look Like to Win at YouTube

https://www.nytimes.com/2025/12/09/arts/television/youtube-alans-universe.html
1•fleahunter•4m ago•0 comments

Bascetta Star

https://mathematische-basteleien.de/bascettastar.htm
1•coolius•6m ago•0 comments

Spied: BMW's First Electric M Car

https://www.thedrive.com/news/2027-bmw-ix3-m-spy-shots
1•PaulHoule•7m ago•0 comments

Show HN: Bifrost – open-source LLM Gateway (50x lower latency than LiteLLM)

https://github.com/maximhq/bifrost
2•dskuldeep•8m ago•0 comments

Springer Nature retracts ~40 publications that trained ANNs on 'bonkers' dataset

https://www.thetransmitter.org/retraction/exclusive-springer-nature-retracts-removes-nearly-40-pu...
2•sundarurfriend•9m ago•0 comments

Show HN: A Werewolf-style puzzle with zero lying

https://www.cluesofwho.com/
1•soasme•10m ago•0 comments

Apple will not let me join the Developer Program – and will not say why

https://yomuapp.kulman.sk/support
1•tectiv3•12m ago•1 comments

PeerTube V8: manage your videos with your team

https://framablog.org/2025/12/09/peertube-v8-manage-your-videos-with-your-team/
3•tcit•12m ago•0 comments

Whitehall rejects £1.8B digital ID price tag – but won't say what it will cost

https://www.theregister.com/2025/12/09/uk_digital_id_costs/
1•jjgreen•13m ago•0 comments

Compiler Engineering in Practice – Part 1: What Is a Compiler?

https://chisophugis.github.io/2025/12/08/compiler-engineering-in-practice-part-1-what-is-a-compil...
1•todsacerdoti•14m ago•0 comments

OpenAI paused a focus on AGI for 8 weeks to quickly improve ChatGPT

https://www.wsj.com/tech/ai/openai-sam-altman-google-code-red-c3a312ad
2•Hyeonjong•15m ago•0 comments

DynamoDB: Resilience and lessons from the Oct 2025 service disruption

https://www.youtube.com/watch?v=YZUNNzLDWb8
1•belter•17m ago•0 comments

The Joel Test: 12 Steps to Better Code (2000)

https://www.joelonsoftware.com/2000/08/09/the-joel-test-12-steps-to-better-code/
1•tamnd•17m ago•0 comments

Velocity-Bridge: Copy on iPhone. Paste on Linux. No Cloud, No macOS Required

https://github.com/Trex099/Velocity-Bridge
1•thunderbong•20m ago•0 comments

Nano Banana

https://imgeditor.co/
1•bellamoon544•22m ago•1 comments

The Joy of Playing Grandia, on Sega Saturn

https://www.segasaturnshiro.com/2025/11/27/the-joy-of-playing-grandia-on-sega-saturn/
3•tosh•22m ago•1 comments

What Is a Codec and Why Is It Important for Video Streaming?

https://www.red5.net/blog/what-is-a-codec/
1•mondainx•27m ago•0 comments

SGML Syntax Reference

http://sgmljs.sgml.net/docs/sgmlrefman.html
1•fanf2•29m ago•0 comments

UN environment report 'hijacked' by US and others over fossil fuels

https://www.bbc.com/news/articles/c1w9ge93w9po
2•defrost•33m ago•0 comments

Embracing the Improbable

https://kevinkelly.substack.com/p/embracing-the-improbable
2•thm•36m ago•0 comments

The 70-20-10 growth formula that’s speeding up career success

https://www.indiatoday.in/education-today/jobs-and-careers/story/the-70-20-10-growth-formula-that...
1•rustoo•42m ago•0 comments

Factor 0.101 Now Available

https://re.factorcode.org/2025/12/factor-0-101-now-available.html
1•todsacerdoti•44m ago•0 comments

It's not censorship. It's democratic self-defense

https://civiceconomist.substack.com/p/its-not-censorship-its-democratic
4•ggirelli•44m ago•0 comments

Stop asking AI to write code

https://bsky.app/profile/beddel.bsky.social/post/3m7juvz7hwc25
1•mesenga•49m ago•1 comments

Show HN: Repack AI – Turn Any Article/Video URL into 10 Social Content Pieces

https://repackai.co/
2•azureray•51m ago•3 comments

Show HN: Arc – Android overlay to run custom AI prompts on any app

https://play.google.com/store/apps/details?id=com.rethink.arc&hl=en_US
1•rethink-hub•51m ago•0 comments

Show HN: A deterministic code-rewrite engine that learns from one example

1•heavymemory•53m ago•0 comments

Zero Lines of code. 1 AI prompt. 1 deployed website

https://github.com/cloudflare/vibesdk
1•bakigul•53m ago•0 comments

Campus Characters: Identical twins, the Byers, live identical lives (2014)

https://thedailytexan.com/2014/03/31/campus-characters-identical-twins-the-byers-live-identical-l...
1•TMWNN•54m ago•0 comments