[PATCH][UBI] remove __exit on functions referenced in '.text' or '.init.text'

Josh Boyer jwboyer at linux.vnet.ibm.com
Fri Jan 26 06:39:52 EST 2007


On Fri, 2007-01-26 at 12:00 +0100, bene at linutronix.de wrote:
> Hi Artem,
> 
> > Yeah, I was actually planning to do the same and get rid of most
> > __init/__exit. But still out of curiosity, may you please elaborate on
> > the problem?
> 
> The Problem is simple: the kernel does not link. The linker reports the
> cross section references as errors. Here is an example:
> 
> `ubi_sysfs_vol_close' referenced in section `.text' of drivers/built-in.o:
> defined in discarded section `.exit.text' of
> drivers/built-in.o`ubi_sysfs_vol_close' referenced in section `.text' of
> drivers/built-in.o: defined in discarded section `.exit.text' of
> drivers/built-in.o`ubi_sysfs_vol_close' referenced in section `.text' of
> drivers/built-in.o: defined in discarded section `.exit.text' of
> drivers/built-in.o`ubi_sysfs_close' referenced in section `.text' of
> drivers/built-in.o: defined in discarded section `.exit.text' of
> drivers/built-in.o`ubi_sysfs_close' referenced in section `.init.text' of
> drivers/built-in.o: defined in discarded section `.exit.text' of
> drivers/built-in.o
> 

What version of GCC is this with?  And do you have UBI debug enabled?
As I said before, I can't recreate this on my system.

josh





More information about the linux-mtd mailing list