ldscript.sparc64 revision 81084
181084Sjake/* $FreeBSD: head/sys/conf/ldscript.sparc64 81084 2001-08-03 01:09:10Z jake $ */ 281084SjakeOUTPUT_FORMAT("elf64-sparc", "elf64-sparc", 381084Sjake "elf64-sparc") 481084SjakeOUTPUT_ARCH(sparc:v9) 581084SjakeENTRY(_start) 681084Sjake SEARCH_DIR(/home/jake/sparc64-unknown-elf/lib); 781084Sjake/* Do we need any of these for elf? 881084Sjake __DYNAMIC = 0; */ 981084SjakeSECTIONS 1081084Sjake{ 1181084Sjake /* Read-only sections, merged into text segment: */ 1281084Sjake . = 0x60000000000 + SIZEOF_HEADERS; 1381084Sjake .interp : { *(.interp) } 1481084Sjake .hash : { *(.hash) } 1581084Sjake .dynsym : { *(.dynsym) } 1681084Sjake .dynstr : { *(.dynstr) } 1781084Sjake .gnu.version : { *(.gnu.version) } 1881084Sjake .gnu.version_d : { *(.gnu.version_d) } 1981084Sjake .gnu.version_r : { *(.gnu.version_r) } 2081084Sjake .rel.init : { *(.rel.init) } 2181084Sjake .rela.init : { *(.rela.init) } 2281084Sjake .rel.text : 2381084Sjake { 2481084Sjake *(.rel.text) 2581084Sjake *(.rel.text.*) 2681084Sjake *(.rel.gnu.linkonce.t.*) 2781084Sjake } 2881084Sjake .rela.text : 2981084Sjake { 3081084Sjake *(.rela.text) 3181084Sjake *(.rela.text.*) 3281084Sjake *(.rela.gnu.linkonce.t.*) 3381084Sjake } 3481084Sjake .rel.fini : { *(.rel.fini) } 3581084Sjake .rela.fini : { *(.rela.fini) } 3681084Sjake .rel.rodata : 3781084Sjake { 3881084Sjake *(.rel.rodata) 3981084Sjake *(.rel.rodata.*) 4081084Sjake *(.rel.gnu.linkonce.r.*) 4181084Sjake } 4281084Sjake .rela.rodata : 4381084Sjake { 4481084Sjake *(.rela.rodata) 4581084Sjake *(.rela.rodata.*) 4681084Sjake *(.rela.gnu.linkonce.r.*) 4781084Sjake } 4881084Sjake .rel.data : 4981084Sjake { 5081084Sjake *(.rel.data) 5181084Sjake *(.rel.data.*) 5281084Sjake *(.rel.gnu.linkonce.d.*) 5381084Sjake } 5481084Sjake .rela.data : 5581084Sjake { 5681084Sjake *(.rela.data) 5781084Sjake *(.rela.data.*) 5881084Sjake *(.rela.gnu.linkonce.d.*) 5981084Sjake } 6081084Sjake .rel.ctors : { *(.rel.ctors) } 6181084Sjake .rela.ctors : { *(.rela.ctors) } 6281084Sjake .rel.dtors : { *(.rel.dtors) } 6381084Sjake .rela.dtors : { *(.rela.dtors) } 6481084Sjake .rel.got : { *(.rel.got) } 6581084Sjake .rela.got : { *(.rela.got) } 6681084Sjake .rel.sdata : 6781084Sjake { 6881084Sjake *(.rel.sdata) 6981084Sjake *(.rel.sdata.*) 7081084Sjake *(.rel.gnu.linkonce.s.*) 7181084Sjake } 7281084Sjake .rela.sdata : 7381084Sjake { 7481084Sjake *(.rela.sdata) 7581084Sjake *(.rela.sdata.*) 7681084Sjake *(.rela.gnu.linkonce.s.*) 7781084Sjake } 7881084Sjake .rel.sbss : 7981084Sjake { 8081084Sjake *(.rel.sbss) 8181084Sjake *(.rel.sbss.*) 8281084Sjake *(.rel.gnu.linkonce.sb.*) 8381084Sjake } 8481084Sjake .rela.sbss : 8581084Sjake { 8681084Sjake *(.rela.sbss) 8781084Sjake *(.rela.sbss.*) 8881084Sjake *(.rel.gnu.linkonce.sb.*) 8981084Sjake } 9081084Sjake .rel.sdata2 : 9181084Sjake { 9281084Sjake *(.rel.sdata2) 9381084Sjake *(.rel.sdata2.*) 9481084Sjake *(.rel.gnu.linkonce.s2.*) 9581084Sjake } 9681084Sjake .rela.sdata2 : 9781084Sjake { 9881084Sjake *(.rela.sdata2) 9981084Sjake *(.rela.sdata2.*) 10081084Sjake *(.rela.gnu.linkonce.s2.*) 10181084Sjake } 10281084Sjake .rel.sbss2 : 10381084Sjake { 10481084Sjake *(.rel.sbss2) 10581084Sjake *(.rel.sbss2.*) 10681084Sjake *(.rel.gnu.linkonce.sb2.*) 10781084Sjake } 10881084Sjake .rela.sbss2 : 10981084Sjake { 11081084Sjake *(.rela.sbss2) 11181084Sjake *(.rela.sbss2.*) 11281084Sjake *(.rela.gnu.linkonce.sb2.*) 11381084Sjake } 11481084Sjake .rel.bss : 11581084Sjake { 11681084Sjake *(.rel.bss) 11781084Sjake *(.rel.bss.*) 11881084Sjake *(.rel.gnu.linkonce.b.*) 11981084Sjake } 12081084Sjake .rela.bss : 12181084Sjake { 12281084Sjake *(.rela.bss) 12381084Sjake *(.rela.bss.*) 12481084Sjake *(.rela.gnu.linkonce.b.*) 12581084Sjake } 12681084Sjake .rel.plt : { *(.rel.plt) } 12781084Sjake .rela.plt : { *(.rela.plt) } 12881084Sjake .init : 12981084Sjake { 13081084Sjake KEEP (*(.init)) 13181084Sjake } = 0x60000000000 13281084Sjake .text : 13381084Sjake { 13481084Sjake *(.trap) 13581084Sjake *(.text) 13681084Sjake *(.text.*) 13781084Sjake *(.stub) 13881084Sjake /* .gnu.warning sections are handled specially by elf32.em. */ 13981084Sjake *(.gnu.warning) 14081084Sjake *(.gnu.linkonce.t.*) 14181084Sjake } = 0x60000000000 14281084Sjake .fini : 14381084Sjake { 14481084Sjake KEEP (*(.fini)) 14581084Sjake } = 0x60000000000 14681084Sjake PROVIDE (__etext = .); 14781084Sjake PROVIDE (_etext = .); 14881084Sjake PROVIDE (etext = .); 14981084Sjake .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) } 15081084Sjake .rodata1 : { *(.rodata1) } 15181084Sjake .sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) } 15281084Sjake .sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) } 15381084Sjake . = ALIGN(0x2000) + (. & (0x2000 - 1)); 15481084Sjake .data : 15581084Sjake { 15681084Sjake *(.data) 15781084Sjake *(.data.*) 15881084Sjake *(.gnu.linkonce.d.*) 15981084Sjake SORT(CONSTRUCTORS) 16081084Sjake } 16181084Sjake .data1 : { *(.data1) } 16281084Sjake .eh_frame : { KEEP (*(.eh_frame)) } 16381084Sjake .gcc_except_table : { *(.gcc_except_table) } 16481084Sjake .ctors : 16581084Sjake { 16681084Sjake /* gcc uses crtbegin.o to find the start of 16781084Sjake the constructors, so we make sure it is 16881084Sjake first. Because this is a wildcard, it 16981084Sjake doesn't matter if the user does not 17081084Sjake actually link against crtbegin.o; the 17181084Sjake linker won't look for a file to match a 17281084Sjake wildcard. The wildcard also means that it 17381084Sjake doesn't matter which directory crtbegin.o 17481084Sjake is in. */ 17581084Sjake KEEP (*crtbegin.o(.ctors)) 17681084Sjake /* We don't want to include the .ctor section from 17781084Sjake from the crtend.o file until after the sorted ctors. 17881084Sjake The .ctor section from the crtend file contains the 17981084Sjake end of ctors marker and it must be last */ 18081084Sjake KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) 18181084Sjake KEEP (*(SORT(.ctors.*))) 18281084Sjake KEEP (*(.ctors)) 18381084Sjake } 18481084Sjake .dtors : 18581084Sjake { 18681084Sjake KEEP (*crtbegin.o(.dtors)) 18781084Sjake KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) 18881084Sjake KEEP (*(SORT(.dtors.*))) 18981084Sjake KEEP (*(.dtors)) 19081084Sjake } 19181084Sjake .plt : { *(.plt) } 19281084Sjake .got : { *(.got.plt) *(.got) } 19381084Sjake .dynamic : { *(.dynamic) } 19481084Sjake /* We want the small data sections together, so single-instruction offsets 19581084Sjake can access them all, and initialized data all before uninitialized, so 19681084Sjake we can shorten the on-disk segment size. */ 19781084Sjake .sdata : 19881084Sjake { 19981084Sjake *(.sdata) 20081084Sjake *(.sdata.*) 20181084Sjake *(.gnu.linkonce.s.*) 20281084Sjake } 20381084Sjake _edata = .; 20481084Sjake PROVIDE (edata = .); 20581084Sjake __bss_start = .; 20681084Sjake .sbss : 20781084Sjake { 20881084Sjake PROVIDE (__sbss_start = .); 20981084Sjake PROVIDE (___sbss_start = .); 21081084Sjake *(.dynsbss) 21181084Sjake *(.sbss) 21281084Sjake *(.sbss.*) 21381084Sjake *(.gnu.linkonce.sb.*) 21481084Sjake *(.scommon) 21581084Sjake PROVIDE (__sbss_end = .); 21681084Sjake PROVIDE (___sbss_end = .); 21781084Sjake } 21881084Sjake .bss : 21981084Sjake { 22081084Sjake *(.dynbss) 22181084Sjake *(.bss) 22281084Sjake *(.bss.*) 22381084Sjake *(.gnu.linkonce.b.*) 22481084Sjake *(COMMON) 22581084Sjake /* Align here to ensure that the .bss section occupies space up to 22681084Sjake _end. Align after .bss to ensure correct alignment even if the 22781084Sjake .bss section disappears because there are no input sections. */ 22881084Sjake . = ALIGN(64 / 8); 22981084Sjake } 23081084Sjake . = ALIGN(64 / 8); 23181084Sjake _end = .; 23281084Sjake PROVIDE (end = .); 23381084Sjake /* Stabs debugging sections. */ 23481084Sjake .stab 0 : { *(.stab) } 23581084Sjake .stabstr 0 : { *(.stabstr) } 23681084Sjake .stab.excl 0 : { *(.stab.excl) } 23781084Sjake .stab.exclstr 0 : { *(.stab.exclstr) } 23881084Sjake .stab.index 0 : { *(.stab.index) } 23981084Sjake .stab.indexstr 0 : { *(.stab.indexstr) } 24081084Sjake .comment 0 : { *(.comment) } 24181084Sjake /* DWARF debug sections. 24281084Sjake Symbols in the DWARF debugging sections are relative to the beginning 24381084Sjake of the section so we begin them at 0. */ 24481084Sjake /* DWARF 1 */ 24581084Sjake .debug 0 : { *(.debug) } 24681084Sjake .line 0 : { *(.line) } 24781084Sjake /* GNU DWARF 1 extensions */ 24881084Sjake .debug_srcinfo 0 : { *(.debug_srcinfo) } 24981084Sjake .debug_sfnames 0 : { *(.debug_sfnames) } 25081084Sjake /* DWARF 1.1 and DWARF 2 */ 25181084Sjake .debug_aranges 0 : { *(.debug_aranges) } 25281084Sjake .debug_pubnames 0 : { *(.debug_pubnames) } 25381084Sjake /* DWARF 2 */ 25481084Sjake .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } 25581084Sjake .debug_abbrev 0 : { *(.debug_abbrev) } 25681084Sjake .debug_line 0 : { *(.debug_line) } 25781084Sjake .debug_frame 0 : { *(.debug_frame) } 25881084Sjake .debug_str 0 : { *(.debug_str) } 25981084Sjake .debug_loc 0 : { *(.debug_loc) } 26081084Sjake .debug_macinfo 0 : { *(.debug_macinfo) } 26181084Sjake /* SGI/MIPS DWARF 2 extensions */ 26281084Sjake .debug_weaknames 0 : { *(.debug_weaknames) } 26381084Sjake .debug_funcnames 0 : { *(.debug_funcnames) } 26481084Sjake .debug_typenames 0 : { *(.debug_typenames) } 26581084Sjake .debug_varnames 0 : { *(.debug_varnames) } 26681084Sjake /* These must appear regardless of . */ 26781084Sjake} 268