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&