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

Mr

https://muazsh.github.io/
1•mouazchamieh•30s ago•0 comments

After 7 years in court, Meta says 9 million claims belong in arbitration

https://www.reuters.com/legal/government/after-7-years-court-meta-says-9-million-claims-belong-ar...
1•gwu78•3m ago•1 comments

Sleep timing is associated with lunar gravity

https://www.pnas.org/doi/10.1073/pnas.2612981123
1•doener•4m ago•0 comments

VNULL-rs – We only care about speed

https://github.com/Flova/vNULL-rs
1•flova•4m ago•0 comments

Nokia Composer in 512 Bytes

https://zserge.com/posts/nokia/
1•sph•8m ago•0 comments

I don't use a mobile phone – Umberto Eco [video]

https://www.youtube.com/watch?v=WE0LD7bXkZo
1•maremmano•9m ago•0 comments

P-256 and the Cost of Compatibility

https://dottedmag.net/blog/p256-system-level-conflict/
1•dottedmag•9m ago•0 comments

Bliss lies on the other side of crushing, crushing boredom

https://www.henrikkarlsson.xyz/p/boredom
1•jger15•11m ago•0 comments

Scams, Lawsuits and Data Centers: The Man Married to Alice Huang

https://www.nytimes.com/2026/12/04/business/alice-huang-husband-nvidia.html
1•gwu78•12m ago•0 comments

Show HN: Mu – A self hosted personal workspace

https://micro.mu?v=2.23.0
1•asim•15m ago•0 comments

How Userspace CUDA Programs Communicate with Nvidia GPUs on Linux

https://shubham0204.github.io/blogpost/programming/cuda-executable-ioctl
1•shubham0204•17m ago•1 comments

Program for One

https://ignorethecode.net/blog/2026/12/06/program_for_one/
1•ingve•26m ago•0 comments

RentnerPDF 1.1.0 adds Factur-X and XRechnung from one invoice model

https://github.com/RentnerKev/RentnerPDF/releases/tag/v1.1.0
1•RentnerKev•29m ago•0 comments

Three-Dimensional Cellular Automata and Parameter Space Art in Minecraft [video]

https://www.youtube.com/watch?v=Wj47IQfvU20
1•exploraz•31m ago•0 comments

Why Growing AI Adoption Raises Alarms About Privacy

https://news.bloomberglaw.com/artificial-intelligence/why-growing-ai-adoption-raises-alarms-about...
2•gwu78•33m ago•1 comments

Show HN: LocalAI Mobile– Run Llama 3.2 and Qwen 2.5 offline in Expo 52 APK demo

https://github.com/Itsvks17/localai-mobile
1•DarkRyoshin•34m ago•0 comments

Show HN: Building 1M+ RPS Distributed Engines in Go and Rust

https://github.com/grfdsasdvef/awesome-highload-architecture
1•snowdensay•34m ago•0 comments

Watchbook – Timestamped notes and search for liked YouTube videos

https://chromewebstore.google.com/detail/watchbook/geiphallhldbmlaobldaaojpmnokcdol
1•smurtazasr•36m ago•0 comments

Physical Intelligence Wins the Robot Olympics: Deep Dive

https://generalrobots.substack.com/p/physical-intelligence-wins-the-olympics
1•YeGoblynQueenne•37m ago•0 comments

Were Nov outages insider companies updating cryptography?

2•chaseadam17•41m ago•0 comments

UK Supermarket Loyalty Prices

https://food-discount-scheme-price-analysis.github.io/loyalty_prices/
1•jonatron•42m ago•0 comments

MI6 chief warns of catastrophic risks of AI and Russian use of cognitive warfare

https://www.theguardian.com/technology/2026/dec/05/ai-warfare-mi6-chief-blaise-metreweli-warning
2•thm•47m ago•1 comments

Clx 0.6.0: Lua native compiler passes Lua 5.5.1 test suite

2•_samt_•49m ago•0 comments

Show HN: Rili – Practice speaking English by calling an AI tutor

https://yofluent.com
5•hichamtikonote•49m ago•1 comments

Measuring LLMs Reverse Engineering Capabilities on Obfuscated Binaries

https://arxiv.org/abs/2612.05213
1•porridgeraisin•50m ago•0 comments

Alibaba Cloud unveils HappyWan, a 45-second native audio-video diffusion model

https://kling3.io/happywan-ai-video-generator
1•wanhappy•50m ago•0 comments

Show HN: OpenStream–free unlimited local dictation for Mac

https://zazai.dev/openstream/
1•Zazai840•56m ago•0 comments

Counterintelligence asks why FBI and CIA didn't stop Jensen Huang's entanglement

https://theconversation.com/im-a-counterintelligence-expert-and-im-wondering-why-the-fbi-and-cia-...
6•nephihaha•57m ago•0 comments

DeskRise – raises your standing desk after an hour. Help add your desk

https://github.com/jipjacob/deskrise
1•HydraZeuson•58m ago•0 comments

Ubuntu has spent years patching GNOME, but what it can't fix is the real problem

https://www.xda-developers.com/ubuntu-has-been-patching-gnomes-missing-basics-since-2017-and-gnom...
2•signa11•1h ago•0 comments