1214571Sdim# This shell script emits a C file. -*- C -*-
2214571Sdim#   Copyright 2006 Free Software Foundation, Inc.
3214571Sdim#
4214571Sdim# This file is part of GLD, the Gnu Linker.
5214571Sdim#
6214571Sdim# This program is free software; you can redistribute it and/or modify
7214571Sdim# it under the terms of the GNU General Public License as published by
8214571Sdim# the Free Software Foundation; either version 2 of the License, or
9214571Sdim# (at your option) any later version.
10214571Sdim#
11214571Sdim# This program is distributed in the hope that it will be useful,
12214571Sdim# but WITHOUT ANY WARRANTY; without even the implied warranty of
13214571Sdim# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14214571Sdim# GNU General Public License for more details.
15214571Sdim#
16214571Sdim# You should have received a copy of the GNU General Public License
17214571Sdim# along with this program; if not, write to the Free Software Foundation,
18214571Sdim# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
19214571Sdim
20214571Sdimcat >>e${EMULATION_NAME}.c <<EOF
21214571Sdimstatic void
22214571Sdimmips_after_parse (void)
23214571Sdim{
24214571Sdim  /* .gnu.hash and the MIPS ABI require .dynsym to be sorted in different
25214571Sdim     ways.  .gnu.hash needs symbols to be grouped by hash code whereas the
26214571Sdim     MIPS ABI requires a mapping between the GOT and the symbol table.  */
27214571Sdim  if (link_info.emit_gnu_hash)
28214571Sdim    {
29214571Sdim      einfo ("%X%P: .gnu.hash is incompatible with the MIPS ABI\n");
30214571Sdim      link_info.emit_hash = TRUE;
31214571Sdim      link_info.emit_gnu_hash = FALSE;
32214571Sdim    }
33214571Sdim  after_parse_default ();
34214571Sdim}
35214571SdimEOF
36214571Sdim
37214571SdimLDEMUL_AFTER_PARSE=mips_after_parse
38