Re: [RFC PATCH] linker script: unify usage of discard definition

From: Mike Frysinger
Date: Sat Jul 04 2009 - 01:51:42 EST


On Fri, Jul 3, 2009 at 19:37, Tejun Heo wrote:
> +/*
> + * DISCARDS must be the last and archs which want some of the default
> + * discarded sections in the kernel image can do so by putting them in
> + * earlier section definition.
> + */
> Â#define DISCARDS Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \
> Â Â Â Â/DISCARD/ : { Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \
> Â Â Â ÂEXIT_TEXT Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \
> Â Â Â ÂEXIT_DATA Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \
> - Â Â Â *(.exitcall.exit) Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \
> + Â Â Â EXIT_CALL Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \
> Â Â Â Â*(.discard) Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \
> Â Â Â Â}

i would add to the comment that some people want to discard exit
text/data at runtime rather than link time due to cross-section
references such as alt instructions, bug table, eh_frame, etc...

otherwise, looks good to me. thanks !

Acked-by: Mike Frysinger <vapier@xxxxxxxxxx>
-mike
èº{.nÇ+‰·Ÿ®‰­†+%ŠËlzwm…ébëæìr¸›zX§»®w¥Š{ayºÊÚë,j­¢f£¢·hš‹àz¹®w¥¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝj"ú!¶iO•æ¬z·švØ^¶m§ÿðà nÆàþY&—