; ------------------------------------------------------------------------
; Copyright (c) 2013-2015 TRUSTONIC LIMITED
; All rights reserved
;
; The present software is the confidential and proprietary information of
; TRUSTONIC LIMITED. You shall not disclose the present software and shall
; use it only in accordance with the terms of the license agreement you
; entered into with TRUSTONIC LIMITED. This software may be subject to
; export or import laws in certain countries.
; ------------------------------------------------------------------------

; virtual address space starts at 0x1000, so any NULL pointer dereferencing
; causes a memory access fault.

RAM_LOAD 0x1000
{
    ; don't use first page, so NULL pointer dereferencing will cause a seg fault.
    .text +0 ALIGN 0x1000
    {
        * (stext, +FIRST)
        * (+RO)                 ; all other sections
        * (etext, +LAST)
    }

    .init +0x0
    {
        * (.init)
    }

    ; in the virtual address space we leave one page unused between code and data.
    .data +0x1000 ALIGN 0x1000
    {
        * (sdata, +FIRST)
        * (+RW)                 ; all other sections with data
        * (edata, +LAST)
    }

    .bss +0x0
    {
        * (sbss, +FIRST)
        * (+ZI)                  ; uninitialized data
        * (stack)                ; put stacks at the end.
        * (heap)                 ; put the heap.
        * (ebss, +LAST)
    }
}
