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

Antares: Highly Efficient Open Weight AI Models for Vulnerability Localization

https://blogs.cisco.com/ai/introducing-antares-the-most-efficient-open-weight-ai-models-for-vulne...
1•chillax•1m ago•0 comments

SecretSpec 0.17: Scopes, secrets caching, SOPS, age, and systemd credentials

https://secretspec.dev/blog/secretspec-0-17-scopes-secrets-caching-age-and-systemd-credentials/
1•domenkozar•7m ago•0 comments

Open dataset of i2c addresses and voltages for 50 common boards

https://github.com/i2c-net/i2c-address-dataset
1•chzburgrz•13m ago•0 comments

TIRx: An Open Compiler Stack for Evolving Frontier ML Kernels

https://tvm.apache.org/2026/06/22/tirx
2•EvgeniyZh•21m ago•0 comments

3D Printed Nuclear Reactor

https://www.youtube.com/watch?v=gwRWRDrfrvA
1•flitzofolov•25m ago•1 comments

Tell HN: Leaving your country is your only real leverage

4•julienreszka•26m ago•5 comments

Show HN: Spur solver – Z3-backed model-finder solved values for coding agent

https://github.com/getspur/spur/tree/main/crates/spur-solver
1•mf_kevintruong•27m ago•0 comments

Basilisk: Fast 100% PEP compliant Python type checker

https://www.basilisk-python.dev/
1•theusus•27m ago•0 comments

Psion Emulator – classic Psion palmtops in your browser

https://joehaines.com/psion/
1•randkyp•35m ago•0 comments

The most official water costs $120k a gallon

https://signoregalilei.com/2026/07/26/the-most-official-water-costs-120000-a-gallon/
3•srijan4•38m ago•0 comments

AI Workspace for Your PC

https://stuard.ai
1•Ifesol•43m ago•1 comments

Verisign Cooperative Agreement

https://www.ntia.gov/program/verisign-cooperative-agreement
4•themaxdavitt•44m ago•0 comments

Nvidia in Talks with OpenAI to Guarantee $250B Financing for Data Center

https://www.wsj.com/tech/ai/nvidia-in-talks-with-openai-to-guarantee-250-billion-financing-for-da...
5•taurath•52m ago•1 comments

Show HN: 3D music visualization on Apple Vision Pro

https://old.reddit.com/r/VisionPro/comments/1v5llv9/3d_music_visualization_on_apple_vision_pro/
1•linxy97•52m ago•0 comments

Show HN: Watch random code typed out on an MS-DOS IDE

https://hackerman.specr.net/
2•vunderba•56m ago•0 comments

Sand battery: Finland's answer to a renewable energy headache

https://www.cnbc.com/2026/07/25/finland-sand-battery-renewable-energy-storage.html
5•coderintherye•57m ago•0 comments

Why AI Doesn't Replace Software Architecture – It Makes It More Valuable

https://wilburhimself.github.io/blog/65-why-ai-doesnt-replace-software-architecture/
1•wilburhimself•58m ago•1 comments

Malicious sites use JavaScript to build malware in browser memory

https://www.bleepingcomputer.com/news/security/malicious-sites-use-javascript-to-build-malware-in...
3•justworks•58m ago•1 comments

Show HN: CarbonSheets – Host your own customizable cheatsheet portal In GitHub

https://carbonsheets.vercel.app/
2•elnoxvie•1h ago•0 comments

Physicists build a computer from 400 particles orbiting in liquid

https://www.tomshardware.com/tech-industry/physicists-build-a-computer-from-400-particles-orbitin...
2•sbulaev•1h ago•0 comments

Sticky notes on a storyboard became my savior productivity app

https://www.taskloco.com/
1•taskloco_nyc•1h ago•0 comments

The Optimization Theory of Everything

https://12gramsofcarbon.com/p/the-optimization-theory-of-everything
1•theahura•1h ago•1 comments

Show HN: Quintile – keyboard-only window grids for Mac

https://github.com/stefanopineda/quintile
1•stefanopineda•1h ago•0 comments

Foxconn drops VMware, adopts hyperconverged upstart Arcrfra

https://www.theregister.com/virtualization/2026/07/27/foxconn-drops-vmware-adopts-hyperconverged-...
2•NordStreamYacht•1h ago•0 comments

Show HN: ASL V6 – Open-source AST red-teaming engine for Python AI agents

https://github.com/sivaadityacoder/asl-v6
2•sivaaditya•1h ago•0 comments

Show HN: Injectable time and timers with custom Date types for TypeScript

https://github.com/jaenyf/time-provider
1•jaenyf•1h ago•0 comments

Multimodal foundation model for image and video understanding from Microsoft

https://huggingface.co/microsoft/Mage-VL
1•MehrdadKhnzd•1h ago•0 comments

Bullwhip Effect

https://en.wikipedia.org/wiki/Bullwhip_effect
4•vismit2000•1h ago•0 comments

It is empowering to hand off execution

https://www.charbzg.com/blog/ai-empowerment
1•charbz•1h ago•1 comments

Palette Vault – Color Palettes and Hex Codes

https://palettevault.github.io/
4•javatuts•1h ago•0 comments