ia64elf.em revision 130562
1146773Ssam# This shell script emits a C file. -*- C -*-
2146773Ssam#   Copyright 2003 Free Software Foundation, Inc.
3146773Ssam#
4146773Ssam# This file is part of GLD, the Gnu Linker.
5146773Ssam#
6146773Ssam# This program is free software; you can redistribute it and/or modify
7146773Ssam# it under the terms of the GNU General Public License as published by
8146773Ssam# the Free Software Foundation; either version 2 of the License, or
9146773Ssam# (at your option) any later version.
10146773Ssam#
11146773Ssam# This program is distributed in the hope that it will be useful,
12146773Ssam# but WITHOUT ANY WARRANTY; without even the implied warranty of
13146773Ssam# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14146773Ssam# GNU General Public License for more details.
15146773Ssam#
16146773Ssam# You should have received a copy of the GNU General Public License
17146773Ssam# along with this program; if not, write to the Free Software
18146773Ssam# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19146773Ssam#
20190207Srpaulo
21190207Srpaulo# This file is sourced from elf32.em, and defines extra ia64-elf
22146773Ssam# specific routines.
23146773Ssam#
24146773Ssam# Define some shell vars to insert bits of code into the standard elf
25146773Ssam# parse_args and list_options functions.
26190207Srpaulo#
27146773Ssamcat >>e${EMULATION_NAME}.c <<EOF
28146773Ssam
29146773Ssam/* None zero if generating binary for Intel Itanium processor.  */
30146773Ssamstatic int itanium = 0;
31146773Ssam
32146773Ssamstatic void
33146773Ssamgld${EMULATION_NAME}_after_parse (void)
34146773Ssam{
35146773Ssam  link_info.need_relax_finalize = TRUE;
36146773Ssam  bfd_elf${ELFSIZE}_ia64_after_parse (itanium);
37146773Ssam}
38146773Ssam
39190207SrpauloEOF
40146773Ssam
41146773SsamPARSE_AND_LIST_PROLOGUE='
42146773Ssam#define OPTION_ITANIUM			300
43146773Ssam'
44190207Srpaulo
45190207SrpauloPARSE_AND_LIST_LONGOPTS='
46190207Srpaulo    { "itanium", no_argument, NULL, OPTION_ITANIUM},
47190207Srpaulo'
48190207Srpaulo
49190207SrpauloPARSE_AND_LIST_OPTIONS='
50190207Srpaulo  fprintf (file, _("\
51190207Srpaulo  --itanium             Generate code for Intel Itanium processor\n"
52190207Srpaulo		   ));
53190207Srpaulo'
54190207Srpaulo
55190207SrpauloPARSE_AND_LIST_ARGS_CASES='
56190207Srpaulo    case OPTION_ITANIUM:
57190207Srpaulo      itanium = 1;
58190207Srpaulo      break;
59190207Srpaulo'
60190207Srpaulo
61190207SrpauloLDEMUL_AFTER_PARSE=gld${EMULATION_NAME}_after_parse
62190207Srpaulo. ${srcdir}/emultempl/needrelax.em
63190207Srpaulo