[PATCH] ARM: Avoid discarding sections that might have SMP_ON_UP fixups

Nicolas Pitre nicolas.pitre at linaro.org
Wed Jan 26 16:31:37 EST 2011


On Wed, 26 Jan 2011, Dave P. Martin wrote:

> SMP_ON_UP fixups lead to vmlinux link errors if those sections are
> discarded at link-time.  In particular this may happen for built-in
> __exit stuff.
> 
> This patch modifies the vmlinux linker script to reduce the amount
> of discarded sections, and tries to make sure that __exit sections
> are kept in.
> 
> This is a hack and probably wrong!  Further discussion is needed.  
> 
> Signed-off-by: Dave Martin <dave.martin at linaro.org>

Since discarded sections are by definition not used, we should at least 
put them into the .init section so to discard them at run time.  And 
only the EXIT_TEXT and EXIT_DATA would need to be kept (see x86 for 
example).


Nicolas



More information about the linux-arm-kernel mailing list