module.ldscript revision 1.2
11.2Schristos/* $NetBSD: module.ldscript,v 1.2 2018/12/29 00:35:21 christos Exp $ */ 21.1Sbjh21 31.1Sbjh21/* linker script for generating RISC OS relocatable modules */ 41.1Sbjh21/* 51.1Sbjh21 * The important thing here is that we need the text segment to be at the 61.1Sbjh21 * start so that the module header ends up in the right place when we 71.1Sbjh21 * flatten this into a binary file. We also don't bother page-aligning 81.1Sbjh21 * anything, because RISC OS won't. 91.1Sbjh21 */ 101.1Sbjh21 111.1Sbjh21OUTPUT_ARCH(arm) 121.1Sbjh21 131.2SchristosPHDRS 141.2Schristos{ 151.2Schristos text PT_LOAD; 161.2Schristos headers PT_PHDR FILEHDR PHDRS; 171.2Schristos} 181.2Schristos 191.1Sbjh21SECTIONS 201.1Sbjh21{ 211.2Schristos .text : { *(.text) *(.gnu.warning) } :text 221.1Sbjh21 _etext = .; 231.1Sbjh21 PROVIDE (etext = .); 241.1Sbjh21 .rodata : { *(.rodata) } 251.1Sbjh21 .data : { *(.data) } 261.1Sbjh21 _edata = .; 271.1Sbjh21 PROVIDE (edata = .); 281.1Sbjh21 __bss_start = .; 291.1Sbjh21 .sbss : { *(.sbss) *(.scommon) } 301.1Sbjh21 .bss : { *(.bss) *(COMMON) } 311.1Sbjh21 _end = .; 321.1Sbjh21 PROVIDE (end = .); 331.2Schristos} 34