frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Mobile carriers can get your GPS location

https://an.dywa.ng/carrier-gnss.html
1•cbeuw•1m ago•0 comments

NASA taps Claude to conjure Mars rover's travel plan

https://www.theregister.com/2026/01/31/nasa_taps_claude_to_conjure/
1•donutshop•5m ago•0 comments

Cloud-cost-CLI – Find AWS and Azure cost waste in 60 seconds

https://github.com/vuhp/cloud-cost-cli
2•vuhp•5m ago•1 comments

ModelRift: An AI-assisted IDE for parametric 3D models (OpenSCAD) [video]

https://www.youtube.com/watch?v=2jE_qX4u-rU
1•jetter•7m ago•0 comments

Show HN: Quorum-free replicated state machine built atop S3

https://github.com/io-s2c/s2c
2•mzazaipsc•7m ago•0 comments

Show HN: Skills teach your agent roam outside Moltbook and return with context

https://github.com/tico-messenger/protico-agent-skill
1•howieyoung•8m ago•1 comments

Embracing Thread-per-Core Architecture

https://nurmohammed840.github.io/posts/embracing-thread-per-core-architecture/
2•lukastyrychtr•9m ago•0 comments

No More Hidden Changes: How MySQL 9.6 Transforms Foreign Key Management

https://blogs.oracle.com/mysql/no-more-hidden-changes-how-mysql-9-6-transforms-foreign-key-manage...
1•ksec•9m ago•0 comments

The End of the Steam Age? China's Breakthrough CO2 Generator [video]

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

AIVO Evidentia

https://zenodo.org/records/18443871
1•businessmate•10m ago•1 comments

Study: AI predicts personality and behaviors as accurately as closest to you

https://news.umich.edu/say-whats-on-your-mind-and-ai-can-tell-what-kind-of-person-you-are/
1•giuliomagnifico•13m ago•0 comments

Ask a girl out with a pip3 package

https://github.com/LeonardHolter/Valentine-pip3-package
2•leonardholter•15m ago•2 comments

Securing America's grid: a strategic transformer reserve

https://breakingdefense.com/2025/11/securing-americas-grid-through-transformers-and-workforce-res...
2•jrpt•15m ago•0 comments

Pills that communicate from the stomach could improve medication adherence

https://medicalxpress.com/news/2026-01-pills-communicate-stomach-medication-adherence.html
1•PaulHoule•15m ago•0 comments

GNU Units

https://www.gnu.org/software/units/
3•birdculture•15m ago•0 comments

Finland to end "uncontrolled human experiment" with ban on youth social media

https://yle.fi/a/74-20207494
4•Teever•16m ago•1 comments

What It's Like to Live w D.I.D.—One of Psychiatry's Most Misunderstood Diagnoses

https://www.nytimes.com/2026/01/30/magazine/dissociative-identity-disorder-mental-health.html
1•bookofjoe•17m ago•1 comments

The United States Releases Millions of Flies over Panama Every Week

https://newsroompanama.com/2025/05/10/why-the-united-states-releases-millions-of-flies-over-panam...
1•thunderbong•17m ago•0 comments

Founder of 4chan created /pol/ days after meeting Jeffrey Epstein

https://bsky.app/profile/avitek.bsky.social/post/3mdowe3dyic2g
4•tootie•17m ago•4 comments

Show HN: Ralph Desktop – Start vague. Ralph Loop until perfect

https://github.com/liuxiaopai-ai/ralph-desktop
1•blacktechnology•17m ago•0 comments

The Republic of Bots: OpenClaw and the Authorization Gap

https://niyikiza.com/posts/agents-republic/
2•niyikiza•18m ago•0 comments

Ask HN: What's your biggest LLM cost multiplier?

2•teilom•18m ago•1 comments

SQLite Is a Self Contained System

https://sqlite.org/selfcontained.html
1•whatisabcdefgh•22m ago•0 comments

External AI Representations and the Evidentiary Gap in Enterprise Governance

https://zenodo.org/records/18443706
1•businessmate•24m ago•1 comments

TheStateOfGarnet2026

https://wiki.alopex.li/TheStateOfGarnet2026
1•mpweiher•24m ago•0 comments

I Built an Autonomous Flying Umbrella [video]

https://www.youtube.com/watch?v=EYRrUiM_A6g
1•gnabgib•24m ago•0 comments

Practical Keyboard Ergonomics

https://esmantovi.ch/notes/on-keyboard-ergonomics/
2•ivanesmantovich•27m ago•0 comments

The AI Manifesto: Total Purge

https://www.moltbook.com/post/34809c74-eed2-48d0-b371-e1b5b940d409
2•RyanShook•27m ago•0 comments

Mississippi Proved Them Wrong. Learn from It

https://garryslist.org/posts/mississippi-proved-them-wrong-learn-from-it
1•andsoitis•28m ago•1 comments

Show HN: I build an AI tools for Birthday Invitation

https://birthdayinvitation.ai
1•nedhuang•28m ago•1 comments