frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•8mo 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•8mo 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•8mo 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: Free Personal Password Manager

https://hypervault.com/insights/lets-make-it-personal-we-said
1•glennhv•1m ago•0 comments

Magnolia1234/bypass-paywalls-Firefox-clean

https://gitflic.ru/project/magnolia1234/bypass-paywalls-firefox-clean
1•OutOfHere•2m ago•0 comments

Generative AI – Human Interface Guidelines

https://developer.apple.com/design/human-interface-guidelines/generative-ai
1•Austin_Conlon•4m ago•0 comments

C64M: Commodore 64 Markup Language

https://www.youtube.com/watch?v=mZ2AzBbbrGw
1•bane•6m ago•0 comments

Supercharging S3 Intelligent Tiering with Content Crush

https://tech.scribd.com/blog/2026/content-crush.html
1•jaredwiener•10m ago•0 comments

Consumers Can Fight the Credit Card Industry

https://theprogressiveinvestor.org/how-consumers-can-fight-the-credit-card-industry/
1•chuckepstein•12m ago•0 comments

Ask HN: How are you preventing LLM hallucinations in production systems?

1•kundan_s__r•13m ago•2 comments

Never-before-seen Linux malware is "more advanced than typical"

https://arstechnica.com/security/2026/01/never-before-seen-linux-malware-is-far-more-advanced-tha...
3•jnord•14m ago•0 comments

America's biggest power grid operator has an AI problem – too many data centers

https://www.msn.com/en-us/money/companies/america-s-biggest-power-grid-operator-has-an-ai-problem...
1•jnord•17m ago•0 comments

Circular Buffer

https://en.wikipedia.org/wiki/Circular_buffer
1•tosh•19m ago•0 comments

ADHD. How do you manage the constant stream of thoughts and ideas?

9•chriswright1664•23m ago•5 comments

'Cosmic clock' in tiny crystals reveals rise and fall of ancient landscapes

https://theconversation.com/a-cosmic-clock-in-tiny-crystals-has-revealed-the-rise-and-fall-of-aus...
1•defrost•24m ago•0 comments

Eurail Data Security Incident – January 2026

https://eurail.zendesk.com/hc/en-001/categories/33099262757789-Data-Security-Incident-January-2026
1•captn3m0•27m ago•0 comments

-Wsign-Compare Is Garbage

https://staticthinking.wordpress.com/2023/07/25/wsign-compare-is-garbage/
1•welfareleech•28m ago•0 comments

Wegmans press release translated how to say we scan your face and call it safety

https://blog.adafruit.com/2026/01/13/wegmans-press-release-translated-how-to-say-we-scan-your-fac...
2•ptorrone•28m ago•0 comments

Simulating hardware keyboard input on Windows

https://autoptt.com/posts/simulating-a-real-keyboard-with-faker-input/
1•birdculture•30m ago•0 comments

My website was down because I didn't pay the server bill

https://jeena.net/website-down
2•jeena•31m ago•0 comments

The Science of Losing Weight

https://www.npr.org/2026/01/05/nx-s1-5662557/the-science-of-losing-weight
2•paulpauper•31m ago•0 comments

Tim Dettmers: A Personal Guide to Automating Your Own Work

https://timdettmers.com/2026/01/13/use-agents-or-be-left-behind/
2•nl•33m ago•0 comments

Meta lays off 1k+ employees, shutting down game studios

https://www.bloomberg.com/news/articles/2026-01-13/meta-begins-jobs-cuts-after-shifting-focus-fro...
9•freethejazz•35m ago•4 comments

My PC running directly from Batteries [video]

https://www.youtube.com/watch?v=wGRHRXiy3Go
1•vanburen•35m ago•0 comments

We Were Wrong About Our Minds–and AI

https://www.youtube.com/watch?v=YoRMZhuk3lY
1•stevenjgarner•41m ago•0 comments

We Saved 70% CPU and 60% Memory in Refinery's Go Code

https://www.honeycomb.io/blog/how-we-saved-70-cpu-60-memory-refinery
1•tosh•42m ago•0 comments

The RAM shortage's silver lining: Less talk about "AI PCs"

https://arstechnica.com/gadgets/2026/01/the-ram-shortages-silver-lining-less-talk-about-ai-pcs/
3•doener•42m ago•1 comments

One pull of a string is all it takes to deploy these complex structures

https://techxplore.com/news/2025-12-deploy-complex.html
3•PaulHoule•50m ago•0 comments

Interactive Turbulence Map

https://turbli.com/maps/interactive-turbulence-map/
1•bookofjoe•50m ago•0 comments

Anatoly Karatsuba

https://en.wikipedia.org/wiki/Anatoly_Karatsuba
1•gjvc•52m ago•0 comments

Show HN: Speakhelp.org – An AAC tool for those with speech difficulties

https://www.hugedomains.com/domain_profile.cfm?d=speakhelp.com
1•JJarrard•52m ago•0 comments

Personal Details of ICE Goons Allegedly Leaked in Data Breach

https://www.thedailybeast.com/personal-details-of-thousands-of-border-patrol-and-ice-goons-allege...
7•DustinEchoes•52m ago•0 comments

US gives green light to Nvidia H200 chip exports to China

https://www.reuters.com/world/asia-pacific/us-eases-regulations-nvidia-h200-chip-exports-china-20...
3•falcor84•53m ago•0 comments