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

/N

1•LoboxPlatform•45m ago•0 comments

Hours later, Airbyte is still unavailable

https://status.airbyte.com
1•LilBytes•47m ago•0 comments

Nvidia says its open source AI strategy remains intact after Jensen Huang's exit

https://techcrunch.com/2026/11/17/nvidia-says-its-open-source-ai-strategy-remains-intact-after-je...
1•anon373839•51m ago•0 comments

Nuke SF

https://nukesf.com/
2•iLuddite•54m ago•0 comments

Show HN: Prototype of a product management tool for AI agent companies

https://featurestream-prototype.vercel.app/
1•srinidhimurali0•55m ago•0 comments

Deutsche Bank hired a Qatari royal. Why?

https://www.ft.com/content/9edd3730-3a15-4e1a-b33a-629aff00e847
2•JumpCrisscross•57m ago•0 comments

Show HN: Neopane. Run Neovim once, show its windows in your multiplexer's panes

https://github.com/spiritledsoftware/neopane
2•ianpascoe•57m ago•1 comments

IRA Velinsky, industrial designer for Commodore and Atari

https://dfarq.homeip.net/ira-velinsky-industrial-designer-of-the-commodore-64/
2•onename•58m ago•0 comments

Voyager 1 hits one light day from Earth

https://science.nasa.gov/mission/voyager/where-are-voyager-1-and-voyager-2-now/
6•robin_reala•59m ago•1 comments

Welcome to the Era of Second-Screen Reading

https://www.theatlantic.com/books/2026/11/sarah-j-maas-acotar-second-screen-reading/689474/
2•FinnLobsien•1h ago•0 comments

Underrated HTML Attributes Worth Using

https://frontendcurated.curated.co/issues/2
2•javatuts•1h ago•0 comments

Voyager Will Carry Earth Sounds Record (1977)

https://science.nasa.gov/missions/voyager-program/voyager-will-carry-earth-sounds-record/
2•divbzero•1h ago•0 comments

Marijke Van Thielen is the first female philosopher naked in Playboy

https://playboy.nl/artikel/700346/marijke-van-thielen-is-de-eerste-filosofe-in-playboy
3•Michelangelo11•1h ago•1 comments

Reaktiv Workbook – A spreadsheet where every cell is Python

https://workbook.bui.app/
1•buibuibui•1h ago•0 comments

After 49 Years, Voyager 1 Is a Mind-Blowing One Light-Day from Earth

https://www.nytimes.com/2026/11/18/science/nasa-voyager-1-earth-light-day.html
2•quapster•1h ago•0 comments

Data centres consume 5 percent of the Netherlands' electricity

https://www.cbs.nl/en-gb/news/2026/47/data-centres-consume-5-percent-of-the-netherlands-electricity
3•HelloUsername•1h ago•0 comments

Show HN: Arbituro

https://arbituro.com/
1•arbituro•1h ago•0 comments

Why people crack games, and why I think buying them is still the better bet [video]

https://www.youtube.com/watch?v=2C1FasPUssg
1•frag•1h ago•0 comments

Security flaw found in Java, third-largest programming language

https://www.bbc.com/news/articles/cke89jevqm1vo
1•Lyngbakr•1h ago•0 comments

Show HN: Qpilot – an AI agent that runs plain-text manual test cases in Chrome

https://github.com/broxhq/qpilot
2•broxhq•1h ago•0 comments

Why didn't Apple make the Mac Apple II compatible? (2018)

https://woz.org/didnt-apple-make-mac-apple-compatible/
2•thamiltonsmith•1h ago•0 comments

Nvidia Q3 FY27 Earnings: $115.8B Revenue, $390B Supply Gamble

https://oplexa.com/insights/company-intelligence/nvidia-q3-fy27-earnings-ai-infrastructure-analysis/
2•oplexa07•1h ago•0 comments

Tired of reading changelogs? VS Code is trying something different

https://code.visualstudio.com/updates/v1_147
1•mechanicalartic•1h ago•0 comments

Ow did NASA achieve their live TV broadcast in 1969? (2013)

https://space.stackexchange.com/questions/2993
3•Skyfall106•1h ago•0 comments

Mojo: Towards One Systems Language for All Hardware, SPLASH'26 Talk [video]

https://www.youtube.com/watch?v=9-97SB5XJh4
1•pjmlp•1h ago•0 comments

Skala

https://bjango.com/mac/skala/
1•robenkleene•1h ago•0 comments

Accelerating Development for Massive Git Repositories

https://developers.googleblog.com/accelerating-development-for-massive-git-repositories/
2•kumrayu•1h ago•0 comments

After Days of Digital Outages, Americans Wonder If the Country Is Breaking

https://www.nytimes.com/2026/11/17/us/politics/outages-flights-banks-tech.html
6•edward•1h ago•2 comments

Show HN: Offline knowledge library for survival and rebuilding

https://lastbook.apposters.com/
1•ehurynovich•1h ago•0 comments

Harness adapters: Safe RL for efficient agentic development

https://huggingface.co/blog/harness-hub/harness-adapters
1•musha68k•1h ago•0 comments