Re: Build error: `.exit.text' referenced in section `.rodata'
From: Ivan Kokshaysky <hidden>
Date: 2008-05-13 20:06:50
Also in:
linux-scsi
From: Ivan Kokshaysky <hidden>
Date: 2008-05-13 20:06:50
Also in:
linux-scsi
On Tue, May 13, 2008 at 09:59:17AM -0500, James Bottomley wrote:
But if that's true then the whole basis for our section based discards is bogus, because the statement generating the jump table could be inside the actual function body instead of being inlined, so if it's failing on x86 as well, we likely need it fixed there too.
Correct.
quoted
It would be good, but in the meantime the 'noinline' fix seems to be a most sensible option...We can certainly add it as a short term option. However, given the push in certain quarters to make even more use of sections as a means of discarding code, we're going to have to ask someone to fix the compiler.
Then maybe building with -fno-jump-tables option would be better solution. I don't think that it will have a noticeable impact on code size or performance, especially on x86. So we need something like this (assuming gcc eventually gets fixed, say gcc 4.5 ;) KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0405, \ $(call cc-option, -fno-jump-tables)) Ivan.