frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Coldcard's $38M (so far) exploit shakes faith in self-custody

https://www.coindesk.com/business/2026/07/31/coldcard-s-usd38-million-so-far-exploit-shakes-faith...
1•wslh•2m ago•1 comments

If technology got better, why did everything get worse?

https://www.sammystraus.com/#if-technology-got-better-why-did-everything-get-worse
1•sammy0910•2m ago•0 comments

Book sellers raise alarm over 'horrific' destruction of rare titles to feed AI

https://www.theguardian.com/technology/2026/aug/02/australian-book-sellers-alarm-destruction-rare...
3•billybuckwheat•3m ago•1 comments

Using Meta AI via WhatsApp for OpenCode

https://github.com/amita-seal/wa-metaai
1•amita2•4m ago•0 comments

AI's real threat to jobs isn't job loss, it's lower paychecks, new research says

https://www.businessinsider.com/ai-could-lower-workers-pay-job-market-impact-2026-7
2•theanonymousone•10m ago•0 comments

Ask HN: How are you using AI to learn?

3•mfalcon•11m ago•0 comments

We're 15-year-olds tired of switching study apps, so we built our own

https://reviscio.com/
1•Luka_Takki•12m ago•1 comments

Retired man plants trees on forgotten land, now it's Sao Paulo's largest park

https://timesofindia.indiatimes.com/world/rest-of-world/in-2003-a-retired-man-planted-trees-on-fo...
2•rmason•12m ago•0 comments

YC founder asks desperate job seekers to tattoo themselves for an interview

https://sfstandard.com/2026/07/30/lemonlime-tattoo-job-interview/
1•theanonymousone•13m ago•0 comments

Show HN: A Google Reader like discovery engine for long-form blogs

https://boredreading.com/
1•khet•13m ago•0 comments

India's monsoon rains in danger as UN chief warns planet is 'on fire'

https://www.theguardian.com/environment/2026/jul/31/india-monsoon-el-nino-hot-dry-conditions-mete...
1•howard941•14m ago•0 comments

FDA panel supports broadening access to peptides popular on the gray market

https://www.npr.org/2026/07/23/nx-s1-5903202/fda-peptides-restrictions
1•gmays•15m ago•0 comments

Show HN: Lumaris – AI biotech intelligence briefs (sample: EGFR resistance)

https://lumaris.nanocorp.app/reports/egfr-resistance-nsclc-2026
1•lumaris_intel•18m ago•0 comments

Drifting SpaceX rocket heading for collision with Moon

https://www.theguardian.com/science/2026/jul/31/spacex-rocket-moon-collision
1•qprofyeh•20m ago•0 comments

Cosmic String

https://en.wikipedia.org/wiki/Cosmic_string
1•whythismatters•20m ago•0 comments

Show HN: I made a music player inspired by late 90s peer-to-peer sharing

https://jdanwire.jordanscales.com/
1•jordanscales•26m ago•0 comments

GPT‑5.6 fuses frontier intelligence with frontier efficiency

https://openai.com/index/gpt-5-6-frontier-intelligence-efficiency/
1•882542F3884314B•27m ago•0 comments

Seedance 2.5

https://seed.bytedance.com/en/blog/one-take-creation-flexible-referencing-introducing-seedance-2-5
1•njaremko•30m ago•0 comments

PaperOS: A native Linux E Ink OS running on BOOX hardware

https://www.reddit.com/r/Onyx_Boox/comments/1vcdkmh/paperos_a_native_linux_e_ink_os_now_running_on/
2•carlosjobim•30m ago•0 comments

Rescue Boat Crews Show Signs of Brain Injuries, but Coast Guard Isn't Looking

https://www.nytimes.com/2026/07/30/us/coast-guard-rescue-boat-surfmen-brain-injury.html
1•bookofjoe•33m ago•2 comments

Let's See Paul Allen's SIMD CSV Parser

http://chunkofcoal.com/posts/simd-csv/
1•mfiguiere•34m ago•0 comments

Soft-deprecating chrono and chrono-tz

https://github.com/chronotope/chrono/issues/1768
2•Paul-E•35m ago•0 comments

Diátaxis

https://diataxis.fr/
27•ryanseys•41m ago•6 comments

Show HN: Search Statistics Like an Absolute Psychopath

https://number.weyland.enterprises/?q=65535
1•hronecviktor•42m ago•0 comments

Ask HN: Best Blogging Platform?

3•asxndu•42m ago•3 comments

Pantograph

https://github.com/jeprinz/pantograph/blob/main/README.md
4•sargstuff•48m ago•0 comments

Uber SubmitQueue: a high-performance speculative merge queue

https://github.com/uber/submitqueue/
1•handfuloflight•51m ago•0 comments

Ads in Software Are Like Stickers on Laptops

https://daringfireball.net/2026/07/ads_in_software_are_like_stickers_on_laptops
2•naves•51m ago•2 comments

Geometrically patterned ancient earthworks in Acre, Rio Branco, Brazil

https://researchportal.helsinki.fi/en/publications/geometrically-patterned-ancient-earthworks-in-...
2•jhncls•52m ago•0 comments

The Silicon Valley Founder Meat Grinder

https://zaksa.zip/blog/silicon-valley-founder-meat-grinder/
48•Kaizeras•54m ago•10 comments