2021-12-05 14:41:44 +01:00
|
|
|
/****************************************************************************
|
2022-01-14 10:18:29 +01:00
|
|
|
* boards/risc-v/qemu-rv/rv-virt/scripts/ld.script
|
2021-12-05 14:41:44 +01:00
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2024-06-12 04:39:41 +02:00
|
|
|
#include <nuttx/config.h>
|
|
|
|
|
2024-07-26 04:02:19 +02:00
|
|
|
#define TEXT_ADDR CONFIG_RAM_START
|
2024-06-12 04:39:41 +02:00
|
|
|
|
2021-12-05 14:41:44 +01:00
|
|
|
SECTIONS
|
|
|
|
{
|
2024-06-12 04:39:41 +02:00
|
|
|
. = TEXT_ADDR;
|
2021-12-05 14:41:44 +01:00
|
|
|
|
2024-04-07 12:20:17 +02:00
|
|
|
/* where the global variable out-of-bounds detection information located */
|
|
|
|
#ifdef CONFIG_MM_KASAN_GLOBAL
|
|
|
|
.kasan.unused :
|
|
|
|
{
|
|
|
|
*(.data..LASANLOC*)
|
|
|
|
}
|
|
|
|
.kasan.global :
|
|
|
|
{
|
|
|
|
KEEP (*(.data..LASAN0))
|
|
|
|
KEEP (*(.data.rel.local..LASAN0))
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2021-12-05 14:41:44 +01:00
|
|
|
.text :
|
|
|
|
{
|
|
|
|
_stext = . ;
|
|
|
|
*(.text)
|
|
|
|
*(.text.*)
|
|
|
|
*(.gnu.warning)
|
|
|
|
*(.stub)
|
|
|
|
*(.glue_7)
|
|
|
|
*(.glue_7t)
|
|
|
|
*(.jcr)
|
|
|
|
|
|
|
|
/* C++ support: The .init and .fini sections contain specific logic
|
|
|
|
* to manage static constructors and destructors.
|
|
|
|
*/
|
|
|
|
|
|
|
|
*(.gnu.linkonce.t.*)
|
|
|
|
*(.init) /* Old ABI */
|
|
|
|
*(.fini) /* Old ABI */
|
|
|
|
_etext = . ;
|
|
|
|
}
|
|
|
|
|
2024-02-27 10:01:08 +01:00
|
|
|
.init_section :
|
|
|
|
{
|
|
|
|
_sinit = ABSOLUTE(.);
|
|
|
|
KEEP(*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
|
|
|
|
KEEP(*(.init_array .ctors))
|
|
|
|
_einit = ABSOLUTE(.);
|
|
|
|
}
|
|
|
|
|
2021-12-05 14:41:44 +01:00
|
|
|
.rodata :
|
|
|
|
{
|
|
|
|
_srodata = . ;
|
|
|
|
*(.rodata)
|
|
|
|
*(.rodata1)
|
|
|
|
*(.rodata.*)
|
|
|
|
*(.gnu.linkonce.r*)
|
|
|
|
_erodata = . ;
|
|
|
|
}
|
|
|
|
|
2021-12-12 15:41:32 +01:00
|
|
|
.tdata : {
|
|
|
|
_stdata = ABSOLUTE(.);
|
|
|
|
*(.tdata .tdata.* .gnu.linkonce.td.*);
|
|
|
|
_etdata = ABSOLUTE(.);
|
|
|
|
}
|
|
|
|
|
|
|
|
.tbss : {
|
|
|
|
_stbss = ABSOLUTE(.);
|
|
|
|
*(.tbss .tbss.* .gnu.linkonce.tb.* .tcommon);
|
|
|
|
_etbss = ABSOLUTE(.);
|
|
|
|
}
|
|
|
|
|
2021-12-05 14:41:44 +01:00
|
|
|
_eronly = ABSOLUTE(.);
|
|
|
|
|
|
|
|
.data :
|
|
|
|
{
|
|
|
|
_sdata = . ;
|
|
|
|
*(.data)
|
|
|
|
*(.data1)
|
|
|
|
*(.data.*)
|
|
|
|
*(.gnu.linkonce.d*)
|
|
|
|
. = ALIGN(4);
|
|
|
|
_edata = . ;
|
|
|
|
}
|
|
|
|
|
|
|
|
.bss :
|
|
|
|
{
|
|
|
|
_sbss = . ;
|
|
|
|
*(.bss)
|
|
|
|
*(.bss.*)
|
|
|
|
*(.sbss)
|
|
|
|
*(.sbss.*)
|
|
|
|
*(.gnu.linkonce.b*)
|
|
|
|
*(COMMON)
|
2024-04-14 12:40:44 +02:00
|
|
|
. = ALIGN(32);
|
2021-12-05 14:41:44 +01:00
|
|
|
_ebss = . ;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Stabs debugging sections. */
|
|
|
|
|
|
|
|
.stab 0 : { *(.stab) }
|
|
|
|
.stabstr 0 : { *(.stabstr) }
|
|
|
|
.stab.excl 0 : { *(.stab.excl) }
|
|
|
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
|
|
|
.stab.index 0 : { *(.stab.index) }
|
|
|
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
|
|
|
.comment 0 : { *(.comment) }
|
|
|
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
|
|
|
.debug_info 0 : { *(.debug_info) }
|
|
|
|
.debug_line 0 : { *(.debug_line) }
|
|
|
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
|
|
|
.debug_aranges 0 : { *(.debug_aranges) }
|
|
|
|
}
|