Atsushi Nemoto wrote: > On Wed, 11 Oct 2006 14:08:44 +0200, Franck Bui-Huu <vagabon.xyz@xxxxxxxxx> wrote: >> This patch introduces __pa_symbol() macro which should be used to >> calculate the physical address of kernel symbols. It also relies >> on RELOC_HIDE() to avoid any compiler's oddities when doing >> arithmetics on symbols. > > I agree with you that we need __pa_symbol(), but what is a purpose of > using RELOC_HIDE() here? Frankly I do not understand what > RELOC_HIDE() does... > RELOC_HIDE(x) is used because arithmetic on symbol addresses is undefined in C language. It avoid gcc to know that: RELOC_HIDE(&_end) + OFFSET is an operation on a symbol address and thus avoid an undefined operation. Franck