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

Unionised French Ubisoft workers call for an international strike

https://www.rockpapershotgun.com/unionised-french-ubisoft-workers-put-out-call-for-an-internation...
1•pythonic_hell•33s ago•0 comments

Apple Accidentally Built the Most Practical AI Infrastructure on Earth

https://sylvainsaurel.substack.com/p/the-silent-architect-how-apple-accidentally
1•janandonly•1m ago•0 comments

Ask HN: Has Show HN become LLM-prompt-centric?

1•piratesAndSons•2m ago•0 comments

African nations now send more money to China than they receive in new loans

https://www.reuters.com/business/finance/african-nations-now-send-more-money-china-than-they-rece...
2•geox•2m ago•0 comments

Amiga Graphics Archive: New collection of nice images from CU Amiga magazine

https://amiga.lychesis.net/updates/2026-01-25.html
1•doener•3m ago•0 comments

Advancing regulatory variant effect prediction with AlphaGenome

https://www.nature.com/articles/s41586-025-10014-0?href=
1•jonbaer•4m ago•0 comments

The JAX sharding type system

https://blog.ezyang.com/2026/01/jax-sharding-type-system/
1•matt_d•4m ago•0 comments

UK Gov: Global biodiversity loss, ecosystem collapse and national security [pdf]

https://assets.publishing.service.gov.uk/media/696e0eae719d837d69afc7de/National_security_assessm...
1•bsmth•5m ago•0 comments

RoboCop: A Glorious, Scathing Satire of America

https://reactormag.com/robocop-a-glorious-scathing-satire-of-america/
3•mindracer•7m ago•0 comments

A Homemade Refrigerated Vest That Can Be Powered Off Battery or Solar [video]

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

Academic Slop Just Reached a New Low

https://jadarma.github.io/blog/posts/2026/01/academic-slop-just-reached-a-new-low/
1•tymscar•8m ago•0 comments

Vibe coding is making design patterns worth it again

https://thefakeborzi.itch.io/tower-chess/devlog/1334091/vibe-coding-is-making-software-architectu...
2•borzi•9m ago•0 comments

What does Werner Herzog's nihilist penguin teach us about life?

https://lwlies.com/article/werner-herzog-penguin-encounters-at-the-end-of-the-world
1•Marceltan•10m ago•0 comments

Who Operates the Badbox 2.0 Botnet?

https://krebsonsecurity.com/2026/01/who-operates-the-badbox-2-0-botnet/
1•mikece•11m ago•0 comments

Attack Against Poland's Grid Disrupted Communication Devices at About 30 Sites

https://www.zetter-zeroday.com/attack-against-polands-grid-disrupted-communication-devices-at-abo...
1•aa_is_op•12m ago•1 comments

A LinkedIn Job Offer Tried to Install Malware on My Machine

https://codecrank.ai/blog/linkedin-malware-warning/
1•campuscodi•12m ago•0 comments

The Endless Pursuit of "The Next New Thing"

https://www.souravinsights.com/blog/the-endless-pursuit-of-the-next-new-thing
1•SouravInsights•12m ago•0 comments

Pigmentation screen in Drosophila reveals regulators of brain dopamine, sleep

https://www.sciencedirect.com/science/article/pii/S2589004225026495
1•PaulHoule•13m ago•0 comments

4MB JavaScript runtime for IoT and edge devices

1•altinmert•15m ago•0 comments

Federal judge sides with city of Norfolk in Flock camera lawsuit

https://www.wtkr.com/news/in-the-community/norfolk/federal-judge-sides-with-city-of-norfolk-in-fl...
1•pilingual•15m ago•0 comments

Amazon to Cut 16,000 Jobs in Latest Round of Layoffs

https://www.nytimes.com/2026/01/28/technology/amazon-corporate-layoffs.html
1•apparent•16m ago•1 comments

Scientists link 22 genes to deadly risks from common virus

https://www.newscientist.com/article/2513522-this-virus-infects-most-of-us-but-why-do-only-some-g...
1•muhammedbash•16m ago•0 comments

Where did southern Australia's record-breaking heatwave come from?

https://theconversation.com/where-did-southern-australias-record-breaking-heatwave-come-from-274417
1•MaysonL•21m ago•0 comments

Tesla's unsupervised robotaxis vanish after earnings announcement

https://electrek.co/2026/01/28/teslas-unsupervised-robotaxis-vanish/
3•Animats•21m ago•0 comments

Show HN: EU Regulations MCP Server – Query GDPR, Dora, NIS2 from Claude

https://github.com/Ansvar-Systems/EU_compliance_MCP
1•Aesir89•22m ago•0 comments

Notes on Clawbot: agents are starting to look like OS runtimes design now

1•chenyusu•23m ago•0 comments

Energy based AI reasoning model – Sudoku solver performance comparison

https://sudoku.logicalintelligence.com/
1•alexjray•24m ago•0 comments

Show HN: BoxLight- a macOS Sonoma ring light app that doesn't waste space

https://www.mimiran.com/boxlight-a-macos-ring-light-that-doesnt-require-tahoe-and-doesnt-waste-sc...
1•reubenswartz•25m ago•0 comments

Choosing a web host feels a lot like a first date

https://www.hostingadvice.com/blog/the-first-30-minutes-in-hosting-are-like-a-first-date/
1•ljh501•29m ago•0 comments

We Optimized the World to Death

https://www.himthe.dev/blog/we-optimized-the-world-to-death
1•vegadw•29m ago•0 comments