Well, If I enable ANY optimisations at all my kernel page faults. I'm sure I could work out why/where given time, but what interested me was the readelf output for kernels compiled with different optimisation levels.
Including the .text,.data and .bss sections my kernel had size:
O0: 0x14000
O1: 0x13000
O2: 0x15000
O3: 0x16000
(My linker script page-aligns everything so this is rounded up quite a bit).
The interesting part was that I was expecting the size of the sections to go DOWN, not UP when optimisations are applied. Why is this not the case? What exactly is GCC optimising?
Also related: What optimisation level do your kernels get built with? Which is optimal?
A few thoughts...
JamesM


