frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Drosophila Brain Model

https://github.com/philshiu/Drosophila_brain_model
1•throwaway2027•2m ago•0 comments

Linux is the future of gaming – Gabe Newell, 2013 at LinuxCon [video]

https://www.youtube.com/watch?v=yeCuasjxsWk
2•embedding-shape•6m ago•0 comments

Meta acquires AI device startup Limitless

https://techcrunch.com/2025/12/05/meta-acquires-ai-device-startup-limitless/
1•Brajeshwar•6m ago•0 comments

White House National Security Strategy from November 2025

https://www.documentcloud.org/documents/26341039-national-security-strategy/
1•petethomas•7m ago•0 comments

Ask HN: Modern C# book for experienced developers?

1•Fire-Dragon-DoL•8m ago•0 comments

In Taxicab Geometry, Pi Equals 4 and Circles Aren't Round

https://www.nytimes.com/interactive/2025/06/09/science/math-strogatz-taxi-geometry.html
1•jawns•9m ago•0 comments

Collusion between firms increases by ninefold after onset of common leadership

https://www.nber.org/papers/w33866
3•delichon•9m ago•1 comments

Omi – MIT open-source your AI pendant can trust

https://www.omi.me/
1•_thinx•10m ago•0 comments

Without evidence, RFK Jr.'s vaccine panel tosses hep B vaccine recommendation

https://arstechnica.com/health/2025/12/without-evidence-rfk-jr-s-vaccine-panel-tosses-heb-b-vacci...
6•doener•11m ago•0 comments

When Fact-Checking Meant Something

https://yalereview.org/article/susan-choi-new-yorker-fact-checking
1•bookofjoe•11m ago•0 comments

EU Commission fines X €120M under the Digital Services Act

https://ec.europa.eu/commission/presscorner/detail/en/ip_25_2934
2•doener•12m ago•0 comments

Show HN: A Superscript Generator That Works with Any Text, Symbols Included

https://superscriptgenerator.net/
1•18272837023•12m ago•0 comments

YouTube caught making AI-edits to videos and adding misleading AI summaries

https://social.growyourown.services/@FediTips/115668457530054406
2•mystraline•13m ago•0 comments

I co-wrote a 1k-page prophetic trilogy with GPT – now free at wordnamefire.com

https://wordnamefire.com/
1•nuevita70•19m ago•0 comments

Google Must Limit Default Contracts to One Year, Judge Rules

https://www.bloomberg.com/news/articles/2025-12-05/google-must-limit-default-contracts-to-one-yea...
2•toomuchtodo•21m ago•1 comments

Are We over the "Jaws Effect?"

https://nautil.us/are-we-finally-over-the-jaws-effect-1253001/
1•fleahunter•21m ago•0 comments

Ask HN: Why we dont we have dark mode on Hacker News yet? this is not funny

1•hexo•25m ago•7 comments

Hierarchical Black Hole Cosmology: Why We Might Live Inside a Black Hole

https://www.researchgate.net/publication/398395677_Hierarchical_Black_Hole_Cosmology_From_Quantum...
1•tvenk•29m ago•1 comments

Puter.js Now Works with Your Favorite Frameworks

https://developer.puter.com/blog/use-puter-js-in-web-frameworks/
1•ent101•30m ago•0 comments

HTML Components (1998)

https://www.w3.org/TR/NOTE-HTMLComponents
2•djoldman•30m ago•0 comments

Advent of Code 2025: The AI Edition – By Peter Norvig

https://github.com/norvig/pytudes/blob/main/ipynb/Advent-2025-AI.ipynb
1•vismit2000•32m ago•0 comments

Does anyone use this commit message etiquette?

1•alekswitko•33m ago•1 comments

Fizz Buzz in 4 lines of CSS

https://mastodon.social/@susam/115668571178604230
1•birdculture•35m ago•0 comments

Instantaneous Velocity Is a Trap

https://www.brethorsting.com/blog/2025/12/instantaneous-velocity-is-a-trap/
2•aaronbrethorst•36m ago•0 comments

Limitless (Rewind) is acquired by Meta

2•mturilin•36m ago•0 comments

Merisadhevi

1•asosoris•42m ago•0 comments

Show HN: Tuned.ws – AI growth strategist for Spotify/Apple Music artists (demo)

https://tuned.ws/demo/
1•stackws•46m ago•0 comments

From Rockets to Heat Pumps

https://www.heatpumped.org/p/from-rockets-to-heat-pumps
2•ssuds•47m ago•0 comments

The Fate of Empires and Search for Survival (1978) [pdf]

https://people.uncw.edu/kozloffm/glubb.pdf
1•measurablefunc•49m ago•0 comments

Surprising emergent behavior of sorting algorithms – Michael Levin [video]

https://www.youtube.com/watch?v=jr1sNYY2t9A
1•duck•50m ago•0 comments