<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>S32 Design Studio中的主题 Re: Is there some introduce document about GCC Linker File (.ld)</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/Is-there-some-introduce-document-about-GCC-Linker-File-ld/m-p/704635#M1779</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is standard GNU Linker file. You can find many tutorials on Internet - for example&amp;nbsp;&lt;A href="http://www.salbut.net/public/gcc-pdf/ld.pdf"&gt;Here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jiri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Sep 2017 08:19:15 GMT</pubDate>
    <dc:creator>jiri_kral</dc:creator>
    <dc:date>2017-09-15T08:19:15Z</dc:date>
    <item>
      <title>Is there some introduce document about GCC Linker File (.ld)</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Is-there-some-introduce-document-about-GCC-Linker-File-ld/m-p/704634#M1778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't understand the mean of below code,Is there some introduce document :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Entry Point */&lt;BR /&gt;ENTRY(Reset_Handler)&lt;/P&gt;&lt;P&gt;HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x00000400;&lt;BR /&gt;STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x00000400;&lt;/P&gt;&lt;P&gt;/* If symbol __flash_vector_table__=1 is defined at link time&lt;BR /&gt; * the interrupt vector will not be copied to RAM.&lt;BR /&gt; * Warning: Using the interrupt vector from Flash will not allow&lt;BR /&gt; * INT_SYS_InstallHandler because the section is Read Only.&lt;BR /&gt; */&lt;BR /&gt;M_VECTOR_RAM_SIZE = DEFINED(__flash_vector_table__) ? 0x0 : 0x0400;&lt;/P&gt;&lt;P&gt;/* Specify the memory areas */&lt;BR /&gt;MEMORY&lt;BR /&gt;{&lt;BR /&gt; /* Flash */&lt;BR /&gt; m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400&lt;BR /&gt; m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010&lt;BR /&gt; m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x0007FBF0&lt;/P&gt;&lt;P&gt;/* SRAM_L */&lt;BR /&gt; m_data (RW) : ORIGIN = 0x1FFF8000, LENGTH = 0x00008000&lt;/P&gt;&lt;P&gt;/* SRAM_U */&lt;BR /&gt; m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00007000&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* Define output sections */&lt;BR /&gt;SECTIONS&lt;BR /&gt;{&lt;BR /&gt; /* The startup code goes first into internal flash */&lt;BR /&gt; .interrupts :&lt;BR /&gt; {&lt;BR /&gt; __VECTOR_TABLE = .;&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; KEEP(*(.isr_vector)) /* Startup code */&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; } &amp;gt; m_interrupts&lt;/P&gt;&lt;P&gt;.flash_config :&lt;BR /&gt; {&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; KEEP(*(.FlashConfig)) /* Flash Configuration Field (FCF) */&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; } &amp;gt; m_flash_config&lt;/P&gt;&lt;P&gt;/* The program code and other data goes into internal flash */&lt;BR /&gt; .text :&lt;BR /&gt; {&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; *(.text) /* .text sections (code) */&lt;BR /&gt; *(.text*) /* .text* sections (code) */&lt;BR /&gt; *(.rodata) /* .rodata sections (constants, strings, etc.) */&lt;BR /&gt; *(.rodata*) /* .rodata* sections (constants, strings, etc.) */&lt;BR /&gt; *(.glue_7) /* glue arm to thumb code */&lt;BR /&gt; *(.glue_7t) /* glue thumb to arm code */&lt;BR /&gt; *(.eh_frame)&lt;BR /&gt; KEEP (*(.init))&lt;BR /&gt; KEEP (*(.fini))&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; } &amp;gt; m_text&lt;/P&gt;&lt;P&gt;.ARM.extab :&lt;BR /&gt; {&lt;BR /&gt; *(.ARM.extab* .gnu.linkonce.armextab.*)&lt;BR /&gt; } &amp;gt; m_text&lt;/P&gt;&lt;P&gt;.ARM :&lt;BR /&gt; {&lt;BR /&gt; __exidx_start = .;&lt;BR /&gt; *(.ARM.exidx*)&lt;BR /&gt; __exidx_end = .;&lt;BR /&gt; } &amp;gt; m_text&lt;/P&gt;&lt;P&gt;.ctors :&lt;BR /&gt; {&lt;BR /&gt; __CTOR_LIST__ = .;&lt;BR /&gt; /* gcc uses crtbegin.o to find the start of&lt;BR /&gt; the constructors, so we make sure it is&lt;BR /&gt; first. Because this is a wildcard, it&lt;BR /&gt; doesn't matter if the user does not&lt;BR /&gt; actually link against crtbegin.o; the&lt;BR /&gt; linker won't look for a file to match a&lt;BR /&gt; wildcard. The wildcard also means that it&lt;BR /&gt; doesn't matter which directory crtbegin.o&lt;BR /&gt; is in. */&lt;BR /&gt; KEEP (*crtbegin.o(.ctors))&lt;BR /&gt; KEEP (*crtbegin?.o(.ctors))&lt;BR /&gt; /* We don't want to include the .ctor section from&lt;BR /&gt; from the crtend.o file until after the sorted ctors.&lt;BR /&gt; The .ctor section from the crtend file contains the&lt;BR /&gt; end of ctors marker and it must be last */&lt;BR /&gt; KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors))&lt;BR /&gt; KEEP (*(SORT(.ctors.*)))&lt;BR /&gt; KEEP (*(.ctors))&lt;BR /&gt; __CTOR_END__ = .;&lt;BR /&gt; } &amp;gt; m_text&lt;/P&gt;&lt;P&gt;.dtors :&lt;BR /&gt; {&lt;BR /&gt; __DTOR_LIST__ = .;&lt;BR /&gt; KEEP (*crtbegin.o(.dtors))&lt;BR /&gt; KEEP (*crtbegin?.o(.dtors))&lt;BR /&gt; KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors))&lt;BR /&gt; KEEP (*(SORT(.dtors.*)))&lt;BR /&gt; KEEP (*(.dtors))&lt;BR /&gt; __DTOR_END__ = .;&lt;BR /&gt; } &amp;gt; m_text&lt;/P&gt;&lt;P&gt;.preinit_array :&lt;BR /&gt; {&lt;BR /&gt; PROVIDE_HIDDEN (__preinit_array_start = .);&lt;BR /&gt; KEEP (*(.preinit_array*))&lt;BR /&gt; PROVIDE_HIDDEN (__preinit_array_end = .);&lt;BR /&gt; } &amp;gt; m_text&lt;/P&gt;&lt;P&gt;.init_array :&lt;BR /&gt; {&lt;BR /&gt; PROVIDE_HIDDEN (__init_array_start = .);&lt;BR /&gt; KEEP (*(SORT(.init_array.*)))&lt;BR /&gt; KEEP (*(.init_array*))&lt;BR /&gt; PROVIDE_HIDDEN (__init_array_end = .);&lt;BR /&gt; } &amp;gt; m_text&lt;/P&gt;&lt;P&gt;.fini_array :&lt;BR /&gt; {&lt;BR /&gt; PROVIDE_HIDDEN (__fini_array_start = .);&lt;BR /&gt; KEEP (*(SORT(.fini_array.*)))&lt;BR /&gt; KEEP (*(.fini_array*))&lt;BR /&gt; PROVIDE_HIDDEN (__fini_array_end = .);&lt;BR /&gt; } &amp;gt; m_text&lt;/P&gt;&lt;P&gt;__etext = .; /* Define a global symbol at end of code. */&lt;BR /&gt; __DATA_ROM = .; /* Symbol is used by startup for data initialization. */&lt;BR /&gt; .interrupts_ram :&lt;BR /&gt; {&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; __VECTOR_RAM__ = .;&lt;BR /&gt; __interrupts_ram_start__ = .; /* Create a global symbol at data start. */&lt;BR /&gt; *(.m_interrupts_ram) /* This is a user defined section. */&lt;BR /&gt; . += M_VECTOR_RAM_SIZE;&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; __interrupts_ram_end__ = .; /* Define a global symbol at data end. */&lt;BR /&gt; } &amp;gt; m_data&lt;/P&gt;&lt;P&gt;__VECTOR_RAM = DEFINED(__flash_vector_table__) ? ORIGIN(m_interrupts) : __VECTOR_RAM__ ;&lt;BR /&gt; __RAM_VECTOR_TABLE_SIZE = DEFINED(__flash_vector_table__) ? 0x0 : (__interrupts_ram_end__ - __interrupts_ram_start__) ;&lt;/P&gt;&lt;P&gt;.data : AT(__DATA_ROM)&lt;BR /&gt; {&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; __DATA_RAM = .;&lt;BR /&gt; __data_start__ = .; /* Create a global symbol at data start. */&lt;BR /&gt; *(.data) /* .data sections */&lt;BR /&gt; *(.data*) /* .data* sections */&lt;BR /&gt; KEEP(*(.jcr*))&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; __data_end__ = .; /* Define a global symbol at data end. */&lt;BR /&gt; } &amp;gt; m_data&lt;/P&gt;&lt;P&gt;__DATA_END = __DATA_ROM + (__data_end__ - __data_start__);&lt;BR /&gt; __CODE_ROM = __DATA_END; /* Symbol is used by code initialization. */&lt;BR /&gt; .code : AT(__CODE_ROM)&lt;BR /&gt; {&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; __CODE_RAM = .;&lt;BR /&gt; __code_start__ = .; /* Create a global symbol at code start. */&lt;BR /&gt; *(.code_ram) /* Custom section for storing code in RAM */&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; __code_end__ = .; /* Define a global symbol at code end. */&lt;BR /&gt; } &amp;gt; m_data&lt;/P&gt;&lt;P&gt;__CODE_END = __CODE_ROM + (__code_end__ - __code_start__);&lt;/P&gt;&lt;P&gt;/* Custom Section Block that can be used to place data at absolute address. */&lt;BR /&gt; /* Use __attribute__((section (".customSection"))) to place data here. */&lt;BR /&gt; .customSectionBlock ORIGIN(m_data_2) :&lt;BR /&gt; {&lt;BR /&gt; KEEP(*(.customSection)) /* Keep section even if not referenced. */&lt;BR /&gt; } &amp;gt; m_data_2&lt;/P&gt;&lt;P&gt;/* Uninitialized data section. */&lt;BR /&gt; .bss :&lt;BR /&gt; {&lt;BR /&gt; /* This is used by the startup in order to initialize the .bss section. */&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; __BSS_START = .;&lt;BR /&gt; __bss_start__ = .;&lt;BR /&gt; *(.bss)&lt;BR /&gt; *(.bss*)&lt;BR /&gt; *(COMMON)&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; __bss_end__ = .;&lt;BR /&gt; __BSS_END = .;&lt;BR /&gt; } &amp;gt; m_data_2&lt;/P&gt;&lt;P&gt;.heap :&lt;BR /&gt; {&lt;BR /&gt; . = ALIGN(8);&lt;BR /&gt; __end__ = .;&lt;BR /&gt; PROVIDE(end = .);&lt;BR /&gt; PROVIDE(_end = .);&lt;BR /&gt; PROVIDE(__end = .);&lt;BR /&gt; __HeapBase = .;&lt;BR /&gt; . += HEAP_SIZE;&lt;BR /&gt; __HeapLimit = .;&lt;BR /&gt; __heap_limit = .;&lt;BR /&gt; } &amp;gt; m_data_2&lt;/P&gt;&lt;P&gt;.stack :&lt;BR /&gt; {&lt;BR /&gt; . = ALIGN(8);&lt;BR /&gt; . += STACK_SIZE;&lt;BR /&gt; } &amp;gt; m_data_2&lt;/P&gt;&lt;P&gt;/* Initializes stack on the end of block */&lt;BR /&gt; __StackTop = ORIGIN(m_data_2) + LENGTH(m_data_2);&lt;BR /&gt; __StackLimit = __StackTop - STACK_SIZE;&lt;BR /&gt; PROVIDE(__stack = __StackTop);&lt;/P&gt;&lt;P&gt;.ARM.attributes 0 : { *(.ARM.attributes) }&lt;/P&gt;&lt;P&gt;ASSERT(__StackLimit &amp;gt;= __HeapLimit, "region m_data_2 overflowed with stack and heap")&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 02:54:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Is-there-some-introduce-document-about-GCC-Linker-File-ld/m-p/704634#M1778</guid>
      <dc:creator>jinhui_wu</dc:creator>
      <dc:date>2017-09-15T02:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Is there some introduce document about GCC Linker File (.ld)</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Is-there-some-introduce-document-about-GCC-Linker-File-ld/m-p/704635#M1779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is standard GNU Linker file. You can find many tutorials on Internet - for example&amp;nbsp;&lt;A href="http://www.salbut.net/public/gcc-pdf/ld.pdf"&gt;Here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jiri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 08:19:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Is-there-some-introduce-document-about-GCC-Linker-File-ld/m-p/704635#M1779</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2017-09-15T08:19:15Z</dc:date>
    </item>
  </channel>
</rss>

