Use linker script to split text section ??

Jer Yu Hsu zysheu@sslab.cs.nthu.edu.tw
Fri Dec 2 06:28:00 GMT 2005


In linker script , I can control the input sections to output sections
mapping.

If I want one output section split to many subsections , how can I do it ?

ex: output section : .text => (split to subsections) .text_1 + .text_2 +
.text_3 + ....


Another question, if i want to insert some null code (nop) in .text
section , how can i do it ?

ex: .text (128K) => 32K code + 2K nop + 32K code + 2K nop+ 32K code + 2K
nop+ 32K code+ 2K nop ( 128K + 2K x 4 )

every 32K code insett 2K null code .


If I want to do these , should I need to modify the linker's source code
or linker script can help i do it ?


Thanks .



More information about the Binutils mailing list