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

Tegelwippen: People in the Netherlands are removing paving slabs

https://northwestbylines.co.uk/environment/tegelwippen-people-in-the-netherlands-are-removing-pav...
1•DamonHD•24s ago•0 comments

Behind the Nvidia Affair Sits a Vast Chinese Spying Machine

https://www.wsj.com/world/nvidia-china-espionage-spy-hacking-ai-174c366b
1•pretext•3m ago•0 comments

Writing a DSL for high performance parallel programming in OxCaml

https://blog.janestreet.com/writing-a-dsl-for-high-performance-parallel-programming-in-oxcaml/
1•joshcsimmons•11m ago•0 comments

The Rise and Reckoning of Jensen Huang – The Circuit with Emily Chang [video]

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

Show HN: Image Ads Turn Product Shots into Scroll-Stoppers

1•eliastuti993•16m ago•0 comments

One process per VM: MacVisor design and architecture

https://scaleninja.com/blog/one-process-per-vm/
2•onzr•20m ago•0 comments

Show HN: Autoeditor – AI for retention video editing

https://www.autoeditor.app/
2•Quise2003•21m ago•1 comments

XYBench: Helping with the Problem Behind the Question

https://huggingface.co/blog/allenai/xybench
1•adunk•22m ago•0 comments

Without Sega, Nvidia likely wouldn't exist today

https://automaton-media.com/en/news/without-sega-nvidia-likely-wouldnt-exist-today-nvidia-ceo-and...
2•tosh•24m ago•0 comments

The multiplier effect: How authoring tools can transform web accessibility

https://www.w3.org/blog/2026/the-multiplier-effect-how-authoring-tools-can-transform-web-accessib...
1•ThibWeb•26m ago•0 comments

How the Jensen Huang scandal created a headache for business-friendly Singapore

https://www.bbc.com/news/articles/ck1exevgql4qo
2•saikatsg•26m ago•0 comments

CrossPoint Reader 2.0

https://crosspointreader.com
1•chasingbrains•27m ago•0 comments

Minnesota mayoral race was a dead-even tie; they drew the winner from a bag

https://www.cnn.com/2026/11/14/us/minnesota-mayoral-race-tie
1•1659447091•31m ago•0 comments

Jensen Huang Affairs Tracker

https://jensenhuangtracker.surge.sh
1•julienmartlet•34m ago•0 comments

Show HN: Free Llms.txt Generator

https://amplifyklicks.com/free-llms-txt-generator/
1•amplifyklicks•35m ago•0 comments

Shine Bright for Voyager's Light‑Day

https://science.nasa.gov/mission/voyager/voyager-1/shine-bright-for-voyagers-light-day/
1•thunderbong•35m ago•0 comments

Show HN: Audio Transcription in Browser with WebGPU

https://whisper.tanpreet.xyz/demo/
1•tanpreetjolly•36m ago•1 comments

The Game: Help people with math

https://game.poshenloh.com/
1•rahimnathwani•37m ago•0 comments

Stop Hardcoding Your Timeouts

https://alfy.blog/2026/04/23/stop-hardcoding-your-timeouts.html
2•birdculture•43m ago•1 comments

Instead of collecting dust, Claude makes your old Kindle useful again

https://www.reddit.com/r/ClaudeAI/comments/1xsk5k9/instead_of_collecting_dust_claude_makes_your_old/
3•taubek•47m ago•0 comments

SSA from Bytecode: Imperative Pearl

https://bernsteinbear.com/blog/ssa-bytecode/
2•fanf2•49m ago•0 comments

Nearly $20M found in Hungary's forests, buildings amid corruption probe

https://www.aljazeera.com/news/2026/11/14/hungarian-investigators-uncover-19-5m-hidden-in-forests...
4•_tk_•58m ago•0 comments

Prime Air secure first SAIL 4 approval from UK Civil Aviation Authority

https://www.aboutamazon.co.uk/news/innovation/prime-air-secures-sail-4-approval-uk-civil-aviation...
1•nephihaha•59m ago•0 comments

How Much Did the November 2026 FAA Outage Cost?

https://www.thepricer.org/how-much-did-the-november-2026-faa-outage-cost/
1•marksmark•59m ago•0 comments

Show HN: MAP & GO! - the day, on a map

https://apps.apple.com/us/app/map-go/id6766313000
2•yairco•1h ago•0 comments

I received a job offer, and they hid a way to launch malicious code

https://www.reddit.com/r/programming/comments/1xvwjeh/how_i_received_a_job_offer_and_they_hid_a_w...
1•taubek•1h ago•1 comments

Show HN: FieldRook – a local-first Windows troubleshooting workstation

https://github.com/Rookweld/FieldRook
1•nullfeather•1h ago•0 comments

Backdooring LLMs – Do you trust your AI provider?

https://pgaleone.eu/ai/2026/11/14/backdooring-llms-and-trust/
2•me2too•1h ago•1 comments

Show HN: Voice-first app onboarding experiment (UI, Pros, Cost)

https://coffeeandtoken.com/anatomy-of-a-voice-first-onboarding/
1•briodf•1h ago•0 comments

Why the Airbus A321XLR Often Gets Stuck Climbing for First Few Hours of Flight

https://simpleflying.com/airbus-a321xlr-often-stuck-climbing-1st-few-hours-flight/
5•edward•1h ago•0 comments