frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•7mo 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•7mo 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•7mo 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).

Power outage in Boulder area affects atomic clock

https://www.cbsnews.com/colorado/news/power-outage-boulder-atomic-clock-nist/
1•jonbaer•1m ago•0 comments

Garuda – Threat Hunting and Investigation Framework

https://cysinfo.com/introduction-to-threat-hunting-using-garuda-framework/
1•solarengineer•3m ago•0 comments

Komodo: Build and deploy software to unlimited servers

https://github.com/moghtech/komodo
1•nateb2022•5m ago•0 comments

Foundation Models for Scientific Discovery and Innovation

https://www.nationalacademies.org/read/29212
1•_alternator_•12m ago•0 comments

Show HN: Pac-Man with Guns

https://pac-man-with-guns.netlify.app/
1•admtal•14m ago•0 comments

Is MCP Overhyped?

https://www.youtube.com/watch?v=CY9ycB4iPyI
1•birdculture•15m ago•0 comments

Trump Media announces merger with fusion firm TAE Technologies

https://www.world-nuclear-news.org/articles/trump-media-announces-merger-with-fusion-firm-tae-tec...
2•manidoraisamy•15m ago•0 comments

Why Kafka Consumers Sometimes Show Lag = 1 Forever

https://medium.com/@katyagorshkova/why-kafka-consumers-sometimes-show-lag-1-forever-2bfabea7630a
1•teleforce•17m ago•0 comments

Show HN: Solo Founder Toolkit Claude Code Plugin – Tools to Ship Faster

https://github.com/ericvtheg/solo-founder-toolkit
1•ericvtheg•17m ago•0 comments

Wearing the hair shirt: a retrospective on Haskell (2003)

https://www.microsoft.com/en-us/research/publication/wearing-hair-shirt-retrospective-haskell-2003/
1•swatson741•18m ago•0 comments

Trump Takes America's 'Imperial Presidency' to a New Level

https://www.nytimes.com/2025/12/21/us/politics/trump-imperial-presidency.html
1•sipofwater•18m ago•1 comments

Hospitals Cater to 'Transplant Tourists' as U.S. Patients Wait for Organs

https://www.nytimes.com/2025/12/16/us/organ-transplants-international-patients.html
2•bookofjoe•20m ago•1 comments

Great White Sharks Were Scared Out of Their Habitat by Just 2 Predators

https://www.sciencealert.com/great-white-sharks-were-scared-out-of-their-habitat-by-just-2-predators
2•QueensGambit•20m ago•0 comments

CVE Notifier – For Slack and Mail

https://github.com/nedlir/CVEnotifier
1•lolz_of_god•21m ago•0 comments

When mice with Alzheimer's inhaled menthol, their cognitive abilities improved (2024)

https://theconversation.com/when-mice-with-alzheimers-inhaled-menthol-their-cognitive-abilities-i...
2•colinprince•24m ago•0 comments

Sanctions Order [lawyer uses Grok to draft filings, misrepresents case law] [pdf]

https://cases.justia.com/federal/district-courts/mississippi/msndce/1:2024cv00074/49169/79/0.pdf
2•apical_dendrite•26m ago•0 comments

Top Jobs – USPS Is Hiring – About.usps.com

https://about.usps.com/careers/career-opportunities/top-jobs.htm
3•JohnCorey•31m ago•1 comments

When disasters strike, home batteries could be a lifeline

https://theconversation.com/when-disasters-strike-home-batteries-could-be-a-lifeline-264698
3•billybuckwheat•31m ago•0 comments

Warren Buffet Archive

https://buffett.cnbc.com/warren-buffett-archive/
1•areoform•32m ago•0 comments

Toad: Unified Experience for AI in the Terminal

https://willmcgugan.github.io/toad-released/
1•ingve•33m ago•0 comments

RLHF Sycophancy: Gemini 3.0 discards calculated data to mimic user edits

https://tomaszmachnik.pl/case-study-pi-en.html
1•musculus•34m ago•0 comments

Nvidia Might Cut RTX 50 GPU Supply by Up to 40% in 2026 Due to Memory Shortages

https://www.pcmag.com/news/nvidia-might-cut-rtx-50-gpu-supply-by-up-to-40-in-2026-due-to-memory-s...
3•_____k•35m ago•0 comments

Show HN: Generate Quiz from YouTube Videos

https://minform.io/tools/youtube-to-quiz-maker
1•eashish93•39m ago•0 comments

Show HN: Geomapping – One tag turns your articles into interactive experiences

https://geomapping.qcw.ai/
1•scaelere•41m ago•0 comments

Qubes OS 4.3.0 has been released

https://www.qubes-os.org/news/2025/12/21/qubes-os-4-3-0-has-been-released/
2•andrewdavidwong•45m ago•0 comments

Scientists achieve 3D chip breakthrough to accelerate AI

https://engineering.stanford.edu/news/scientists-and-us-foundry-achieve-3d-chip-breakthrough-acce...
2•geox•45m ago•0 comments

Does the market return 10% on average?

https://nbelakovski.substack.com/p/does-the-market-really-return-10
3•actinium226•47m ago•1 comments

Solar storms could hit Earth and produce auroras

https://www.pbs.org/newshour/science/severe-solar-storms-could-hit-earth-space-forecasters-say-he...
3•QueensGambit•52m ago•0 comments

Ranked: The Best Countries at Math

https://www.visualcapitalist.com/ranked-the-best-countries-at-math/
2•amichail•54m ago•1 comments

Show HN: Don't trust your docs, codument instead

https://benquemax.com/essay/codumentation
2•markkuhaukka•55m ago•0 comments