1*1424dfb3Schristos/* script_test_2.t -- linker script test 2 for gold 2*1424dfb3Schristos 3*1424dfb3Schristos Copyright (C) 2008-2020 Free Software Foundation, Inc. 4*1424dfb3Schristos Written by Ian Lance Taylor <iant@google.com>. 5*1424dfb3Schristos 6*1424dfb3Schristos This file is part of gold. 7*1424dfb3Schristos 8*1424dfb3Schristos This program is free software; you can redistribute it and/or modify 9*1424dfb3Schristos it under the terms of the GNU General Public License as published by 10*1424dfb3Schristos the Free Software Foundation; either version 3 of the License, or 11*1424dfb3Schristos (at your option) any later version. 12*1424dfb3Schristos 13*1424dfb3Schristos This program is distributed in the hope that it will be useful, 14*1424dfb3Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 15*1424dfb3Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16*1424dfb3Schristos GNU General Public License for more details. 17*1424dfb3Schristos 18*1424dfb3Schristos You should have received a copy of the GNU General Public License 19*1424dfb3Schristos along with this program; if not, write to the Free Software 20*1424dfb3Schristos Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 21*1424dfb3Schristos MA 02110-1301, USA. */ 22*1424dfb3Schristos 23*1424dfb3Schristostest_addr_alias = test_addr; 24*1424dfb3Schristos 25*1424dfb3SchristosSECTIONS 26*1424dfb3Schristos{ 27*1424dfb3Schristos /* With luck this will work everywhere. */ 28*1424dfb3Schristos . = 0x10000000; 29*1424dfb3Schristos 30*1424dfb3Schristos /* With luck this will be enough to get the program working. */ 31*1424dfb3Schristos .text : { *(.text) } 32*1424dfb3Schristos . += 0x100000; 33*1424dfb3Schristos . = ALIGN(0x100); 34*1424dfb3Schristos .data : { *(.data) } 35*1424dfb3Schristos .got : { *(.got .toc) } 36*1424dfb3Schristos .got.plt : { *(.got.plt) } 37*1424dfb3Schristos .bss : { *(.bss) } 38*1424dfb3Schristos 39*1424dfb3Schristos /* Now the real test. */ 40*1424dfb3Schristos . = 0x20000001; 41*1424dfb3Schristos start_test_area = .; 42*1424dfb3Schristos .gold_test ALIGN(16) : SUBALIGN(32) { 43*1424dfb3Schristos start_test_area_1 = .; 44*1424dfb3Schristos 45*1424dfb3Schristos /* No sections should wind up here, because of the EXCLUDE_FILE. */ 46*1424dfb3Schristos *( EXCLUDE_FILE(script_test*) .gold_test) 47*1424dfb3Schristos 48*1424dfb3Schristos /* This should match only script_test_2b.o. */ 49*1424dfb3Schristos script_test_2b.o(.gold_test) 50*1424dfb3Schristos 51*1424dfb3Schristos /* This should match the remaining sections. */ 52*1424dfb3Schristos *(.gold_test) 53*1424dfb3Schristos 54*1424dfb3Schristos . = 60; 55*1424dfb3Schristos start_data = .; 56*1424dfb3Schristos BYTE(1) 57*1424dfb3Schristos SHORT(2) 58*1424dfb3Schristos LONG(4) 59*1424dfb3Schristos QUAD(8) 60*1424dfb3Schristos end_data = .; 61*1424dfb3Schristos 62*1424dfb3Schristos start_fill = .; 63*1424dfb3Schristos FILL(0x12345678); 64*1424dfb3Schristos . = . + 7; 65*1424dfb3Schristos BYTE(0) 66*1424dfb3Schristos end_fill = .; 67*1424dfb3Schristos } 68*1424dfb3Schristos end_test_area = .; 69*1424dfb3Schristos test_addr = ADDR(.gold_test); 70*1424dfb3Schristos} 71