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

uBlock Origin filter to block autoplay videos in TechCrunch

https://cornfieldlabs.github.io/posts/ublock-stop-techcrunch-autoplay-video/post.html
1•cornfieldlabs•45s ago•0 comments

GTA 6

1•jiogetty•1m ago•0 comments

NIST: Small Business Cybersecurity Corner

https://www.nist.gov/itl/smallbusinesscyber
1•rramadass•6m ago•0 comments

Show HN: Tempo Match – find a Spotify song at any BPM

https://tempo-match.hadalin.me/
1•supr_strudl•6m ago•0 comments

The Internals of a Badbox Operation

https://synthient.com/blog/the-internals-of-a-badbox-operation
1•ersinesen•11m ago•0 comments

Autonomous Agents Need Mandatory Access Control

https://www.legiscope.com/blog/autonomous-agents-mandatory-access-control.html
2•Thiebaut•13m ago•1 comments

Drama Studio: local realistic text-to-speech synthesis engine for Apple Silicon

https://github.com/maralski/drama-studio
1•maralski•13m ago•0 comments

Remote Jobs API – one JSON API for 70 remote job boards (1.4M+ live listings)

https://remote-jobs-api.tten.no
1•earnnova-dev•13m ago•0 comments

The quest for immortality has become serious business

https://economist.com/business/2026/11/02/the-quest-for-immortality-has-become-serious-business
1•andsoitis•14m ago•0 comments

Show HN: WorkProof – Discover Fresh Global Work Opportunities

https://www.worknproof.online/
1•Vakra•15m ago•0 comments

Ask HN: How are you protecting your apps and infra after recent vulnerabilities?

1•__warlord__•15m ago•1 comments

Railway infra agent goes rogue, attempts to breach competitor

https://twitter.com/jakerunzer/status/2117474337682780643
1•kristianc•18m ago•0 comments

Ask HN: What are you doing to protect the privacy of your notes?

2•ugur2nd•22m ago•3 comments

Show HN: OpenYog, SQLyog Community Ported to Qt 6 for Linux and Windows

https://github.com/AbdulOhab/openyog
2•ab_wahab01•25m ago•0 comments

Nvidia orders data centre clients to reduce China exposure

https://www.ft.com/content/1902df70-1380-4588-bad5-171352b575f2
2•JumpCrisscross•25m ago•0 comments

Lite Pinescript

https://ribqa.com/chart
1•armatadh•27m ago•0 comments

Show HN: Inline Logs, console.log values next to your code in VS Code

https://github.com/lagudafuadtosin/inline-logs
2•lagudafuad•32m ago•0 comments

Nvidia – open-source auto-ontology

https://github.com/NVIDIA/auto-ontology
2•campervans•32m ago•1 comments

GitHub Agentic Workflows are generally available

https://github.blog/changelog/2026-10-28-github-agentic-workflows-generally-available/
4•theletterf•36m ago•0 comments

Railway employee tries to hack a competitors infrastructure

https://twitter.com/joshmanders/status/2117458724407415295
1•ashishmax31•37m ago•0 comments

Show HN: Building a Self-Evolving WAF Engine via Inductive Logic Programming

https://prologwaf.site/
2•lokinpendawa•37m ago•0 comments

Walking Through the Knowldge Era

https://sert121.bearblog.dev/the-knowledge-era/
2•sert_121•38m ago•0 comments

AI Arbitrator

https://www.adr.org/ai-arbitrator/
1•JumpCrisscross•40m ago•0 comments

Quantity vs. quality in pottery is a lie – LessWrong

https://www.lesswrong.com/posts/LrAqM4bGmAoA79rP3/quantity-vs-quality-in-pottery-is-a-lie
2•amanverasia•42m ago•1 comments

Lovable: Many Apps Built on the Platform Expose Sensitive Data

https://www.crissyfield.de/research/lovable-en/
3•taubek•42m ago•0 comments

Disney Plans Layoffs, Targeting 20% Cost Savings

https://www.bloomberg.com/news/articles/2026-11-03/disney-eyes-thousands-of-layoffs-with-managers...
3•thunderbong•49m ago•0 comments

A Decade of Kill Bugs

https://alangrow.com/blog/a-decade-of-kill-bugs
3•signa11•49m ago•1 comments

Show HN: Vectoys – 3D devices for landing pages, drawn as plain SVG

https://vectoys.com/
2•mertduzgun•50m ago•0 comments

Show HN: Privato - smart, scoped and temporary data access for personal agents

1•richardmeng•52m ago•0 comments

For anyone who wants to build a complete website

https://www.facebook.com/p/Mustafa-Mahmoud-61593084344596/?locale=ar_AR
2•T-inter•53m ago•0 comments