Back to home page

LXR

 
 

    


Warning, /spec/build/bsps/microblaze/microblaze_fpga/linkcmds.yml is written in an unsupported language. File is not indexed.

0001 SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
0002 build-type: config-file
0003 content: |
0004   /* SPDX-License-Identifier: BSD-2-Clause */
0005 
0006   /*
0007    * Copyright (C) 2021 On-Line Applications Research Corporation (OAR)
0008    *
0009    * Redistribution and use in source and binary forms, with or without
0010    * modification, are permitted provided that the following conditions
0011    * are met:
0012    * 1. Redistributions of source code must retain the above copyright
0013    *    notice, this list of conditions and the following disclaimer.
0014    * 2. Redistributions in binary form must reproduce the above copyright
0015    *    notice, this list of conditions and the following disclaimer in the
0016    *    documentation and/or other materials provided with the distribution.
0017    *
0018    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
0019    * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0020    * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0021    * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
0022    * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
0023    * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
0024    * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0025    * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
0026    * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
0027    * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
0028    * POSSIBILITY OF SUCH DAMAGE.
0029    */
0030 
0031   ENTRY (_start)
0032   STARTUP (start.o)
0033   _TEXT_START_ADDR = DEFINED(_TEXT_START_ADDR) ? _TEXT_START_ADDR : 0x80000000;
0034 
0035   MEMORY
0036     {
0037         BRAM     (AIW) : ORIGIN = 0x00000000, LENGTH = 0x10000
0038         RAM   : ORIGIN = _TEXT_START_ADDR, LENGTH = ${BSP_MICROBLAZE_FPGA_RAM_LENGTH}
0039     }
0040 
0041   REGION_ALIAS ("REGION_START", BRAM);
0042   REGION_ALIAS ("REGION_VECTOR", BRAM);
0043   REGION_ALIAS ("REGION_TEXT", RAM);
0044   REGION_ALIAS ("REGION_TEXT_LOAD", RAM);
0045   REGION_ALIAS ("REGION_RODATA", RAM);
0046   REGION_ALIAS ("REGION_RODATA_LOAD", RAM);
0047   REGION_ALIAS ("REGION_DATA", RAM);
0048   REGION_ALIAS ("REGION_DATA_LOAD", RAM);
0049   REGION_ALIAS ("REGION_FAST_DATA", RAM);
0050   REGION_ALIAS ("REGION_FAST_DATA_LOAD", RAM);
0051   REGION_ALIAS ("REGION_BSS", RAM);
0052   REGION_ALIAS ("REGION_WORK", RAM);
0053   REGION_ALIAS ("REGION_STACK", RAM);
0054 
0055   SECTIONS
0056   {
0057     .vectors.reset 0x0 : { KEEP (*(.vectors.reset)) } = 0
0058     .vectors.sw_exception 0x8 : { KEEP (*(.vectors.sw_exception)) } = 0
0059     .vectors.interrupt 0x10 : { KEEP (*(.vectors.interrupt)) } = 0
0060     .vectors.debug_sw_break 0x18 : { KEEP (*(.vectors.debug_sw_break)) } = 0
0061     .vectors.hw_exception 0x20 : { KEEP (*(.vectors.hw_exception)) } = 0
0062     . = _TEXT_START_ADDR;
0063     .text : ALIGN_WITH_INPUT {
0064       bsp_section_text_begin = .;
0065       *(.text.unlikely .text.*_unlikely)
0066       *(.text .stub .text.* .gnu.linkonce.t.*)
0067       /* .gnu.warning sections are handled specially by elf32.em.  */
0068       *(.gnu.warning)
0069       *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
0070     } > REGION_TEXT AT > REGION_TEXT_LOAD
0071     .init : ALIGN_WITH_INPUT {
0072       KEEP (*(.init))
0073     } > REGION_TEXT AT > REGION_TEXT_LOAD
0074     .fini : ALIGN_WITH_INPUT {
0075       KEEP (*(.fini))
0076 
0077       /*
0078       * If requested, align the size of the combined start and text
0079       * section to the next power of two to meet MPU region
0080       * alignment requirements.
0081       */
0082       . = DEFINED (bsp_align_text_and_rodata_end_to_power_of_2) ?
0083           bsp_section_start_begin
0084           + ALIGN (. - bsp_section_start_begin,
0085           1 << LOG2CEIL (. - bsp_section_start_begin)) : .;
0086 
0087       bsp_section_text_end = .;
0088     } > REGION_TEXT AT > REGION_TEXT_LOAD
0089     bsp_section_text_size = bsp_section_text_end - bsp_section_text_begin;
0090     bsp_section_text_load_begin = LOADADDR (.text);
0091     bsp_section_text_load_end = bsp_section_text_load_begin + bsp_section_text_size;
0092 
0093     . = ALIGN(4);
0094 
0095     /* Added to handle pic code */
0096     .got : {
0097       *(.got)
0098     } > REGION_RODATA AT > REGION_RODATA_LOAD
0099     .got1 : {
0100       *(.got1)
0101     } > REGION_RODATA AT > REGION_RODATA_LOAD
0102     .got2 : {
0103       *(.got2)
0104     } > REGION_RODATA AT > REGION_RODATA_LOAD
0105 
0106     _frodata = . ;
0107     .rodata : ALIGN_WITH_INPUT {
0108       *(.rodata)
0109       *(.rodata.*)
0110       *(.gnu.linkonce.r.*)
0111       CONSTRUCTORS; /* Is this needed? */
0112     } > REGION_RODATA AT > REGION_RODATA_LOAD
0113     _erodata = .;
0114     .eh_frame : ALIGN_WITH_INPUT {
0115       KEEP (*(.eh_frame))
0116     } > REGION_RODATA AT > REGION_RODATA_LOAD
0117     .jcr : {
0118       *(.jcr)
0119     } > REGION_RODATA AT > REGION_RODATA_LOAD
0120     .gcc_except_table : ALIGN_WITH_INPUT {
0121       *(.gcc_except_table)
0122     } > REGION_RODATA AT > REGION_RODATA_LOAD
0123     .tdata : ALIGN_WITH_INPUT {
0124       _TLS_Data_begin = .;
0125       *(.tdata .tdata.* .gnu.linkonce.td.*)
0126       _TLS_Data_end = .;
0127     } > REGION_RODATA AT > REGION_RODATA_LOAD
0128     .tbss : ALIGN_WITH_INPUT {
0129       _TLS_BSS_begin = .;
0130       *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0131       _TLS_BSS_end = .;
0132     } > REGION_RODATA AT > REGION_RODATA_LOAD
0133     _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
0134     _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
0135     _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
0136     _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
0137     _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
0138     _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0139 
0140     .ctors : {
0141       _dummy_symbol__ = .;
0142       __CTOR_LIST__ = .;
0143       ___CTORS_LIST___ = .;
0144       KEEP (*crtbegin.o(.ctors))
0145       KEEP (*(EXCLUDE_FILE(*crtend.o) .ctors))
0146       KEEP (*(SORT(.ctors.*)))
0147       KEEP (*(.ctors*))
0148       __CTOR_END__ = .;
0149       ___CTORS_END___ = .;
0150     } > REGION_RODATA AT > REGION_RODATA_LOAD
0151     .dtors : {
0152       __DTOR_LIST__ = .;
0153       ___DTORS_LIST___ = .;
0154       KEEP (*crtbegin.o(.dtors))
0155       KEEP (*(EXCLUDE_FILE(*crtend.o) .dtors))
0156       KEEP (*(SORT(.dtors.*)))
0157       KEEP (*(.dtors))
0158       PROVIDE(__DTOR_END__ = .);
0159       PROVIDE(___DTORS_END___ = .);
0160     } > REGION_RODATA AT > REGION_RODATA_LOAD
0161     .rtemsroset : {
0162       /* Special FreeBSD linker set sections */
0163       __start_set_sysctl_set = .;
0164       *(set_sysctl_*);
0165       __stop_set_sysctl_set = .;
0166       *(set_domain_*);
0167       *(set_pseudo_*);
0168 
0169       KEEP (*(SORT(.rtemsroset.*)))
0170       bsp_section_rodata_end = .;
0171     } > REGION_RODATA AT > REGION_RODATA_LOAD
0172 
0173     .data : ALIGN_WITH_INPUT {
0174       bsp_section_data_begin = .;
0175       *(.data .data.* .gnu.linkonce.d.*)
0176       SORT(CONSTRUCTORS)
0177     } > REGION_DATA AT > REGION_DATA_LOAD
0178     .data1 : ALIGN_WITH_INPUT {
0179       *(.data1)
0180     } > REGION_DATA AT > REGION_DATA_LOAD
0181     .rtemsrwset : ALIGN_WITH_INPUT {
0182       KEEP (*(SORT(.rtemsrwset.*)))
0183       bsp_section_data_end = .;
0184     } > REGION_DATA AT > REGION_DATA_LOAD
0185     bsp_section_data_size = bsp_section_data_end - bsp_section_data_begin;
0186     bsp_section_data_load_begin = LOADADDR (.data);
0187     bsp_section_data_load_end = bsp_section_data_load_begin + bsp_section_data_size;
0188 
0189     .bss : ALIGN_WITH_INPUT {
0190       bsp_section_bss_begin = .;
0191       *(.dynbss)
0192       *(.bss .bss.* .gnu.linkonce.b.*)
0193       *(COMMON)
0194       bsp_section_bss_end = .;
0195     } > REGION_BSS AT > REGION_BSS
0196     bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_begin;
0197 
0198     . = ALIGN(8);
0199 
0200     .rtemsstack (NOLOAD) : ALIGN_WITH_INPUT {
0201       bsp_section_rtemsstack_begin = .;
0202       *(SORT_BY_ALIGNMENT (SORT_BY_NAME (.rtemsstack*)))
0203       bsp_section_rtemsstack_end = .;
0204     } > REGION_WORK AT > REGION_WORK
0205     bsp_section_rtemsstack_size = bsp_section_rtemsstack_end - bsp_section_rtemsstack_begin;
0206 
0207     .work : ALIGN_WITH_INPUT {
0208       /*
0209       * The work section will occupy the remaining REGION_WORK region and
0210       * contains the RTEMS work space and heap.
0211       */
0212       bsp_section_work_begin = .;
0213       . += ORIGIN (REGION_WORK) + LENGTH (REGION_WORK) - ABSOLUTE (.);
0214       bsp_section_work_end = .;
0215     } > REGION_WORK AT > REGION_WORK
0216     bsp_section_work_size = bsp_section_work_end - bsp_section_work_begin;
0217 
0218     .stack : ALIGN_WITH_INPUT {
0219       /*
0220       * The stack section will occupy the remaining REGION_STACK region and may
0221       * contain the task stacks.  Depending on the region distribution this
0222       * section may be of zero size.
0223       */
0224       bsp_section_stack_begin = .;
0225       . += ORIGIN (REGION_STACK) + LENGTH (REGION_STACK) - ABSOLUTE (.);
0226       bsp_section_stack_end = .;
0227     } > REGION_STACK AT > REGION_STACK
0228     bsp_section_stack_size = bsp_section_stack_end - bsp_section_stack_begin;
0229 
0230     RamBase = ORIGIN (REGION_WORK);
0231     RamSize = LENGTH (REGION_WORK);
0232     RamEnd = RamBase + RamSize;
0233     WorkAreaBase = bsp_section_work_begin;
0234     HeapSize = 0;
0235   }
0236 copyrights:
0237 - Copyright (C) 2021 On-Line Applications Research Corporation (OAR)
0238 enabled-by: true
0239 install-path: ${BSP_LIBDIR}
0240 links: []
0241 target: linkcmds
0242 type: build