如果user希望程式的section的結尾能在16 byte boundary上。 加上]. = ALIGN(16); 可以達到這個功能, 如下:
.text : { *(.text .stub .text.* .gnu.linkonce.t.*) KEEP (*(.text.*personality*))*(.gnu.warning) . = ALIGN(16); }
KEEP是避免程式碼被garbage collection去掉。 下面是說明:
Input section and garbage collection When link-time garbage collection is in use (`--gc-sections'), it is often useful to mark sections that should not be eliminated. This is accomplished by surrounding an input section's wildcard entry with KEEP(), as in KEEP(*(.init)) or KEEP(SORT(*)(.ctors)).
|