185815Sobrien# This shell script emits a C file. -*- C -*- 2130561Sobrien# Copyright 2001, 2002, 2003 Free Software Foundation, Inc. 385815Sobrien# 485815Sobrien# This file is part of GLD, the Gnu Linker. 585815Sobrien# 685815Sobrien# This program is free software; you can redistribute it and/or modify 785815Sobrien# it under the terms of the GNU General Public License as published by 885815Sobrien# the Free Software Foundation; either version 2 of the License, or 985815Sobrien# (at your option) any later version. 1085815Sobrien# 1185815Sobrien# This program is distributed in the hope that it will be useful, 1285815Sobrien# but WITHOUT ANY WARRANTY; without even the implied warranty of 1385815Sobrien# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1485815Sobrien# GNU General Public License for more details. 1585815Sobrien# 1685815Sobrien# You should have received a copy of the GNU General Public License 1785815Sobrien# along with this program; if not, write to the Free Software 18218822Sdim# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. 1985815Sobrien# 2085815Sobrien 2185815Sobrien# This file is sourced from elf32.em. It is used by targets for 2285815Sobrien# which relaxation is not just an optimization, but for correctness. 2385815Sobrien 2485815SobrienLDEMUL_BEFORE_ALLOCATION=need_relax_${EMULATION_NAME}_before_allocation 2585815Sobrien 2685815Sobriencat >>e${EMULATION_NAME}.c <<EOF 2785815Sobrien 2885815Sobrienstatic void 29130561Sobrienneed_relax_${EMULATION_NAME}_before_allocation (void) 3085815Sobrien{ 3185815Sobrien /* Call main function; we're just extending it. */ 3285815Sobrien gld${EMULATION_NAME}_before_allocation (); 3385815Sobrien 3485815Sobrien /* Force -relax on if not doing a relocatable link. */ 35130561Sobrien if (! link_info.relocatable) 36130561Sobrien command_line.relax = TRUE; 3785815Sobrien} 3885815SobrienEOF 39