[arm] fix problem with gcc 4.4 to ensure the boot code is in the binary
seems that gcc 4.4 or the newer binutils likes to put linker generated shims first in link order. Tweak the boot code to use a special section that is ordered first by the linker script.
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
.text
|
||||
.section ".text.boot"
|
||||
.globl _start
|
||||
_start:
|
||||
b reset
|
||||
|
||||
@@ -6,6 +6,10 @@ SECTIONS
|
||||
{
|
||||
. = %MEMBASE%;
|
||||
|
||||
/* text/read-only data */
|
||||
.text.boot : { *(.text.boot) }
|
||||
.text : { *(.text .text.* .glue_7* .gnu.linkonce.t.*) } =0x9090
|
||||
|
||||
.interp : { *(.interp) }
|
||||
.hash : { *(.hash) }
|
||||
.dynsym : { *(.dynsym) }
|
||||
@@ -33,9 +37,6 @@ SECTIONS
|
||||
.init : { *(.init) } =0x9090
|
||||
.plt : { *(.plt) }
|
||||
|
||||
/* text/read-only data */
|
||||
.text : { *(.text .text.* .glue_7* .gnu.linkonce.t.*) } =0x9090
|
||||
|
||||
.rodata : {
|
||||
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
||||
. = ALIGN(4);
|
||||
|
||||
@@ -6,6 +6,10 @@ SECTIONS
|
||||
{
|
||||
. = %ROMBASE%;
|
||||
|
||||
/* text/read-only data */
|
||||
.text.boot : { *(.text.boot) }
|
||||
.text : { *(.text .text.* .glue_7* .gnu.linkonce.t.*) } =0x9090
|
||||
|
||||
.interp : { *(.interp) }
|
||||
.hash : { *(.hash) }
|
||||
.dynsym : { *(.dynsym) }
|
||||
@@ -33,9 +37,6 @@ SECTIONS
|
||||
.init : { *(.init) } =0x9090
|
||||
.plt : { *(.plt) }
|
||||
|
||||
/* text/read-only data */
|
||||
.text : { *(.text .text.* .glue_7* .gnu.linkonce.t.*) } =0x9090
|
||||
|
||||
.rodata : {
|
||||
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
||||
. = ALIGN(4);
|
||||
|
||||
Reference in New Issue
Block a user