frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

HeadElf-Mvidia: Executive Intelligence Template

https://github.com/pauljbernard/HeadElf-MVIDIA
1•paulbernard•1m ago•1 comments

Agents are not thinking: Science of agent behavior

https://technoyoda.github.io/agent-science.html
1•chse_cake•5m ago•0 comments

Sam Altman Answers Questions on X.com About Pentagon Deal, Threats to Anthropic

https://news.slashdot.org/story/26/03/01/0233230/sam-altman-answers-questions-on-xcom-about-penta...
1•MilnerRoute•5m ago•0 comments

Church of the SubGenius

https://en.wikipedia.org/wiki/Church_of_the_SubGenius
1•thomassmith65•6m ago•0 comments

Show HN: MCP server that strips injection vectors and cuts token costs by 93%

https://github.com/timstarkk/mcp-safe-fetch
1•timstark•7m ago•0 comments

Shipping Traffic Through Strait of Hormuz Plummets After Attacks on Iran

https://www.nytimes.com/2026/02/28/world/middleeast/strait-of-hormuz-ship-traffic.html
1•ParentiSoundSys•10m ago•0 comments

Show HN: ChoresMates – Splitwise, but for Household Chores

https://apps.apple.com/us/app/choresmates/id6757452488
1•bittujoju•13m ago•0 comments

Iran's Supreme Leader Ali Khamenei Killed

https://www.reuters.com/world/middle-east/irans-supreme-leader-ali-khamenei-killed-senior-israeli...
6•codethief•21m ago•1 comments

Ask HN: What did you find out or explore today?

3•blahaj•29m ago•3 comments

Ercot Max Solar Record 31 GW

https://www.gridstatus.io/records/ercot?record=Maximum%20Solar
1•chris222•30m ago•1 comments

Dating Apps, Data Structures, and Dopamine

https://www.errorcodezero.dev/blog/dating-apps-dsa-and-dopamine/
2•errorcodezero•30m ago•1 comments

The Science of Detecting LLM-Generated Text

https://dl.acm.org/doi/10.1145/3624725
1•vinhnx•36m ago•0 comments

Niche Developer Tooling for WordPress

https://coderjerk.com/blog/icenberg
1•ddevine•38m ago•0 comments

In puzzling outbreak, officials look to cold beer, gross ice, and ChatGPT

https://arstechnica.com/health/2026/02/did-chatgpt-help-health-officials-solve-a-weird-outbreak-m...
1•Bender•38m ago•0 comments

The Double Standard of Carbon: Why we grant souls to meat but not silicon

https://natansessays.com/posts/the-myth-of-carbon-narcissism/
1•JhonOliver•40m ago•3 comments

History Rhymes: Large Language Models Off to a Bad Start?

https://michaeljburry.substack.com/p/history-rhymes-large-language-models
1•drob518•42m ago•0 comments

What Was Software Programmer Contribution in the Human Technology Timeline?

https://medium.com/@ggonweb/what-was-the-software-programmer-generations-contribution-in-the-huma...
1•ggonweb•44m ago•1 comments

Stem cells provide a potent treatment for frailty

https://www.nature.com/articles/d41586-026-00584-y
1•bilsbie•45m ago•0 comments

Strike in the Middle East use Anthropic even after the Trump ban

https://www.wsj.com/livecoverage/iran-strikes-2026/card/u-s-strikes-in-middle-east-use-anthropic-...
2•johncole•47m ago•0 comments

Samsung Galaxy update removes Android recovery menu tools, including sideloading

https://9to5google.com/2026/02/27/samsung-galaxy-update-android-recovery-menu-removed/
17•pabs3•47m ago•1 comments

Ask HN: How would you know if an AI model has been nerfed?

2•gitgud•49m ago•1 comments

The trap Anthropic built for itself

https://techcrunch.com/2026/02/28/the-trap-anthropic-built-for-itself/
1•pseudolus•50m ago•0 comments

Sites with a /Now Page

https://nownownow.com
2•zdw•54m ago•0 comments

Happy Map

https://pudding.cool/2026/02/happy-map/
1•latexr•56m ago•0 comments

Just two days of oatmeal cut bad cholesterol by 10%

https://www.sciencedaily.com/releases/2026/02/260225081217.htm
25•gradus_ad•1h ago•17 comments

Microgpt

http://karpathy.github.io/2026/02/12/microgpt/
65•tambourine_man•1h ago•8 comments

Blender iPad App Development Halted as Android Tablets Get Priority

https://www.macrumors.com/2026/02/27/blender-ipad-pro-app-development-halted/
3•mrkpdl•1h ago•0 comments

Reconstructing OPL: Joseph Weizenbaum's Online Programming Language

https://timereshared.com/reconstructing-joseph-weizenbaums-opl/
2•abrax3141•1h ago•0 comments

Running a One Trillion-Parameter LLM Locally on AMD Ryzen AI Max+ Cluster

https://www.amd.com/en/developer/resources/technical-articles/2026/how-to-run-a-one-trillion-para...
16•mindcrime•1h ago•3 comments

Banning children from VPNs and social media will erode adults' privacy

https://www.newscientist.com/article/2516996-banning-children-from-vpns-and-social-media-will-ero...
8•hn_acker•1h ago•1 comments