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

Powers of Ten (1977) [video]

https://www.youtube.com/watch?v=0fKBhvDjuy0
1•susam•1m ago•0 comments

3D-Agent

https://3d-agent.com
1•gsunshinel•4m ago•0 comments

Tourists to US would have to reveal 5 years of social media activity: new plan

https://www.theguardian.com/us-news/2025/dec/10/tourists-social-media-trump
5•mikhael•9m ago•1 comments

Creating a Benevolent Industrial Deployer for Memecoins

https://substack.com/@fitziswriting/p-181255460
1•fitzyap•10m ago•0 comments

Internal RFCs saved us months of wasted work

https://highimpactengineering.substack.com/p/the-illusion-of-shared-understanding
1•romannikolaev•11m ago•0 comments

Replican't

https://thinkhuman.com/replicant/
2•jamesgill•11m ago•0 comments

RAM Is Ruining Everything

https://www.theverge.com/report/839506/ram-shortage-price-increases-pc-gaming-smartphones
1•edward•12m ago•0 comments

Transcripts dialectics Gregory Bateson 19th of July 1967 [pdf]

https://villonfilms.ca/main/transcripts-dialectics-gregory-bateson-19-7-67.pdf
1•oriettaxx•16m ago•0 comments

Hark: Voice prompts for LLMs, meeting minutes, quick voice journaling

https://github.com/FPurchess/hark
1•FPurchess•16m ago•0 comments

I Pitched Netflix a Friends-Style Casablanca Sitcom

https://stohl.substack.com/p/i-pitched-netflix-a-casablanca-sitcom
1•FreeQueso•18m ago•0 comments

Show HN: A 2-row, 16-key keyboard designed for smartphones

https://k-keyboard.com/Why-QWERTY-mini
2•QWERTYmini•19m ago•0 comments

Verum 2 closed back option

https://www.pragmaticaudio.com/articles/2023/07/welcome-to-pragmatic-audio/
1•juniedai•20m ago•1 comments

Ask HN: Why is codex suddenly giving me this error?

1•fcpguru•21m ago•0 comments

Show HN: Hacker News, Disstilled

https://www.trydistilled.ai/
1•alexbemore•22m ago•0 comments

Pro-AI super PAC launches first candidate ads

https://www.cnn.com/2025/12/10/tech/pro-ai-super-pac-launches-first-candidate-ads
3•e12e•22m ago•2 comments

Show HN: Skald – open-source context layer API that runs in your VPC

https://www.useskald.com/
3•yakkomajuri•23m ago•0 comments

A Thousand and One Nights in Italy

https://publicdomainreview.org/essay/a-thousand-and-one-nights-in-italy
2•lermontov•25m ago•0 comments

Epistatic Attack Surface: Redefining Cybersecurity Through Pareto Optimization

https://zenodo.org/records/17883443
1•alknqi•25m ago•0 comments

Nvidia-backed Starcloud trains first AI model in space, orbital data centers

https://www.cnbc.com/2025/12/10/nvidia-backed-starcloud-trains-first-ai-model-in-space-orbital-da...
3•gok•26m ago•0 comments

South Carolina sees 'alarming' increase in measles cases, with 280 in quarantine

https://scdailygazette.com/2025/12/05/sc-sees-alarming-increase-in-measles-cases-with-280-in-quar...
5•geox•26m ago•0 comments

Show HN: Automated License Plate Reader Coverage in the USA

https://alpranalysis.com
2•sodality2•26m ago•0 comments

Unsloth – Train LLMs 2x faster with 70% less VRAM

https://github.com/unslothai/unsloth
1•jhack•30m ago•0 comments

Unsupervised Cycle Detection in Agentic Applications

https://arxiv.org/abs/2511.10650
1•PaulHoule•33m ago•0 comments

Big Ideas 2026: Part 1

https://www.a16z.news/p/big-ideas-2026-part-1
2•amenghra•33m ago•0 comments

Changes to Via, Hypothesis' proxy server for annotation

https://web.hypothes.is/blog/changes-to-via-hypothesis-proxy-server-for-annotation/
1•cxr•34m ago•0 comments

I made a website to check if Cloudflare is down

https://www.iscloudflaredown.com/
2•vinlock•35m ago•1 comments

AIbraham Lincoln, the First AI Presidential Candidate

https://www.voteabe2028.ai/
2•beAbU•37m ago•1 comments

Is It a Bubble? By Howard Marks

https://www.oaktreecapital.com/insights/memo/is-it-a-bubble
6•saigrandhi•38m ago•0 comments

Testing and Benchmarking of AI Compilers

https://www.broune.com/blog/testing-and-benchmarking-of-ai-compilers
1•chubot•38m ago•0 comments

Prevention of PTSD Symptoms in Soldiers Using Attention Bias Modification

https://psychiatryonline.org/doi/full/10.1176/appi.ajp.20250160
1•wslh•39m ago•0 comments