Changeset 618 for trunk/src/binutils/ld


Ignore:
Timestamp:
Aug 16, 2003, 11:33:53 PM (22 years ago)
Author:
bird
Message:

Joined the port of 2.11.2 with 2.14.

Location:
trunk/src/binutils/ld
Files:
4 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/binutils/ld/Makefile.in

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r617 r618  
    1 # Makefile.in generated automatically by automake 1.4 from Makefile.am
    2 
    3 # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
     1# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
     2
     3# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
    44# This Makefile.in is free software; the Free Software Foundation
    55# gives unlimited permission to copy and/or distribute it,
     
    101101STRINGIFY = @STRINGIFY@
    102102STRIP = @STRIP@
     103TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
     104TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
    103105USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
    104106USE_NLS = @USE_NLS@
    105107VERSION = @VERSION@
     108bfdincludedir = @bfdincludedir@
     109bfdlibdir = @bfdlibdir@
    106110l = @l@
     111use_sysroot = @use_sysroot@
    107112
    108113INTLLIBS = @INTLLIBS@
     
    135140# a cross-linker, in which case the default is empty.  See genscripts.sh.)
    136141# Otherwise, they are replaced with the ones given in LIB_PATH,
    137 # which may have the form: LIB_PATH=/lib:/usr/local/lib
    138 LIB_PATH =
     142# which may have the form: LIB_PATH=/lib:/usr/local/lib.  This can be set
     143# when the linker is configured via the --with-lib-path configure switch.
     144LIB_PATH = @LIB_PATH@
    139145
    140146BASEDIR = $(srcdir)/..
     
    145151# What version of the manual to build
    146152DOCVER = gen
     153
     154# Options to extract the man page from ld.texinfo
     155MANCONF = -Dman
     156
     157TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl
     158
     159POD2MAN = pod2man --center="GNU Development Tools" \
     160        --release="binutils-$(VERSION)" --section=1
     161
    147162
    148163#stuff for self hosting (can be overridden in config file).
     
    218233        earmcoff.o \
    219234        earmelf.o \
     235        earmelf_fbsd.o \
    220236        earmelf_linux.o \
     237        earmelf_nbsd.o \
     238        earmelfb_nbsd.o \
    221239        earmelf_oabi.o \
     240        earmnto.o \
    222241        earmnbsd.o \
    223242        earmpe.o \
     
    230249        eavrmega161.o \
    231250        eavrmega603.o \
     251        eavr1.o \
     252        eavr2.o \
     253        eavr3.o \
     254        eavr4.o \
     255        eavr5.o \
    232256        ecoff_sparc.o \
    233257        ecrisaout.o \
     
    239263        ed30velf.o \
    240264        edelta68.o \
     265        eelf32_dlx.o \
    241266        eebmon29k.o \
    242267        eelf32_i960.o \
     
    247272        eelf32bmipn32.o \
    248273        eelf32btsmip.o \
     274        eelf32btsmipn32.o \
    249275        eelf32ltsmip.o \
     276        eelf32ltsmipn32.o \
    250277        eelf32ebmip.o \
    251278        eelf32elmip.o \
    252279        eelf32fr30.o \
     280        eelf32frv.o \
    253281        eelf32i370.o \
     282        eelf32ip2k.o \
     283        eelf32iq2000.o \
     284        eelf32iq10.o \
    254285        eelf32l4300.o \
    255286        eelf32lmip.o \
    256287        eelf32lppc.o \
     288        eelf32lppcnto.o \
    257289        eelf32lppcsim.o \
    258290        eelf32mcore.o \
     291        eelf32openrisc.o \
    259292        eelf32ppc.o \
     293        eelf32ppc_fbsd.o \
    260294        eelf32ppclinux.o \
     295        eelf32ppcnto.o \
    261296        eelf32ppcsim.o \
     297        eelf32ppcwindiss.o \
     298        eelf32vax.o \
     299        eelf32xstormy16.o \
     300        eelf32xtensa.o \
    262301        eelf_i386.o \
    263302        eelf_i386_be.o \
    264303        eelf_i386_chaos.o \
     304        eelf_i386_fbsd.o \
     305        eelf_i386_ldso.o \
     306        eelf_s390.o \
    265307        egld960.o \
    266308        egld960coff.o \
     
    268310        eh8300h.o \
    269311        eh8300s.o \
     312        eh8300elf.o \
     313        eh8300hn.o \
     314        eh8300sn.o \
     315        eh8300helf.o \
     316        eh8300self.o \
     317        eh8300hnelf.o \
     318        eh8300snelf.o \
    270319        eh8500.o \
    271320        eh8500b.o \
     
    277326        ehppaelf.o \
    278327        ehppalinux.o \
     328        ehppanbsd.o \
     329        ehppaobsd.o \
    279330        ei386aout.o \
    280331        ei386beos.o \
     
    288339        ei386msdos.o \
    289340        ei386nbsd.o \
     341        ei386nto.o \
    290342        ei386nw.o \
    291343        ei386pe.o \
     
    301353        em68kcoff.o \
    302354        em68kelf.o \
     355        em68kelfnbsd.o \
    303356        em68klinux.o \
    304357        em68klynx.o \
     
    314367        emipslnews.o \
    315368        emipspe.o \
     369        emsp430x1101.o \
     370        emsp430x1111.o \
     371        emsp430x1121.o \
     372        emsp430x1122.o \
     373        emsp430x1132.o \
     374        emsp430x1331.o \
     375        emsp430x1351.o \
     376        emsp430x149.o \
     377        emsp430x148.o \
     378        emsp430x147.o \
     379        emsp430x135.o \
     380        emsp430x133.o \
     381        emsp430x110.o \
     382        emsp430x112.o \
     383        emsp430x122.o \
     384        emsp430x1222.o \
     385        emsp430x123.o \
     386        emsp430x1232.o \
     387        emsp430x412.o \
     388        emsp430x413.o \
     389        emsp430x311.o \
     390        emsp430x312.o \
     391        emsp430x313.o \
     392        emsp430x314.o \
     393        emsp430x315.o \
     394        emsp430x323.o \
     395        emsp430x325.o \
     396        emsp430x336.o \
     397        emsp430x337.o \
     398        emsp430x435.o \
     399        emsp430x436.o \
     400        emsp430x447.o \
     401        emsp430x448.o \
     402        emsp430x449.o \
     403        emsp430x169.o \
     404        emsp430x168.o \
     405        emsp430x167.o \
     406        emsp430x155.o \
     407        emsp430x156.o \
     408        emsp430x157.o \
    316409        enews.o \
    317410        ens32knbsd.o \
     411        eor32.o \
     412        eor32elf.o \
    318413        epc532macha.o \
     414        epdp11.o \
    319415        epjelf.o \
    320416        epjlelf.o \
     
    325421        esa29200.o \
    326422        esh.o \
     423        eshelf32.o \
     424        eshlelf32.o \
     425        eshelf32_linux.o \
     426        eshlelf32_linux.o \
     427        eshelf32_nbsd.o \
     428        eshlelf32_nbsd.o \
    327429        eshelf.o \
    328430        eshelf_linux.o \
    329431        eshlelf_linux.o \
     432        eshelf_nbsd.o \
     433        eshlelf_nbsd.o \
     434        eshelf_nto.o \
     435        eshlelf_nto.o \
    330436        eshl.o \
    331437        eshlelf.o \
     
    340446        etic30aout.o \
    341447        etic30coff.o \
     448        etic3xcoff.o \
     449        etic3xcoff_onchip.o \
     450        etic4xcoff.o \
    342451        etic54xcoff.o \
    343452        etic80coff.o \
    344453        evanilla.o \
    345454        evax.o \
     455        evaxnbsd.o \
    346456        evsta.o \
    347457        ew65.o \
     
    351461
    352462ALL_64_EMULATIONS = \
     463        eelf64_aix.o \
    353464        eelf64_ia64.o \
     465        eelf64_ia64_fbsd.o \
     466        eshelf64.o \
     467        eshlelf64.o \
     468        eshelf64_nbsd.o \
     469        eshlelf64_nbsd.o \
    354470        eelf_x86_64.o \
     471        eelf_x86_64_fbsd.o \
     472        eelf64_s390.o \
    355473        eelf64_sparc.o \
     474        eelf64_sparc_fbsd.o \
    356475        eelf64alpha.o \
     476        eelf64alpha_fbsd.o \
     477        eelf64alpha_nbsd.o \
    357478        eelf64bmip.o \
    358479        eelf64btsmip.o \
    359480        eelf64ltsmip.o \
    360         eelf64hppa.o
     481        eelf64hppa.o \
     482        eelf64mmix.o \
     483        emmo.o \
     484        eelf64ppc.o \
     485        eelf64lppc.o \
     486        ehppa64linux.o
    361487
    362488
     
    394520# These all start with e so 'make clean' can find them.
    395521
    396 GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} ${exec_prefix} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
     522GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@
    397523GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
    398524
     
    411537MAINTAINERCLEANFILES = ldver.texi
    412538
     539# We want to reconfigure if configure.host or configure.tgt changes.
     540CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt
     541
    413542MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
    414543        ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
     
    418547# Stuff that should be included in a distribution.  The diststuff
    419548# target is run by the taz target in ../Makefile.in.
    420 LDDISTSTUFF = ldgram.c ldgram.h ldlex.c
     549EXTRA_DIST = ldgram.c ldgram.h ldlex.c $(man_MANS)
    421550
    422551DISTCLEANFILES = tdirs site.exp site.bak stringify.sed
     
    462591DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
    463592
    464 TAR = tar
     593TAR = gtar
    465594GZIP_ENV = --best
    466595SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES)
     
    479608$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in  acinclude.m4
    480609        cd $(srcdir) && $(ACLOCAL)
     610
     611config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     612        $(SHELL) ./config.status --recheck
    481613$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
    482614        cd $(srcdir) && $(AUTOCONF)
     
    647779        list='$(INFO_DEPS)'; \
    648780        for file in $$list; do \
    649           test -z "$ii" \
     781          test -z "$$ii" \
    650782            || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
    651783        done
     
    760892        rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
    761893          rev="$$subdir $$rev"; \
    762           test "$$subdir" = "." && dot_seen=yes; \
     894          test "$$subdir" != "." || dot_seen=yes; \
    763895        done; \
    764896        test "$$dot_seen" = "no" && rev=". $$rev"; \
     
    10021134
    10031135ldmain.o: ldmain.c config.status
    1004         $(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' -DSCRIPTDIR='"$(scriptdir)"' -DTARGET='"@target@"' $(srcdir)/ldmain.c
     1136        $(COMPILE) -c -DDEFAULT_EMULATION='"$(EMUL)"' \
     1137          -DSCRIPTDIR='"$(scriptdir)"' -DBINDIR='"$(bindir)"' \
     1138          -DTOOLBINDIR='"$(tooldir)/bin"' \
     1139          -DTARGET='"@target@"' @TARGET_SYSTEM_ROOT_DEFINE@ \
     1140          $(srcdir)/ldmain.c
    10051141
    10061142ldemul-list.h: Makefile
     
    10261162  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/a29k.sc ${GEN_DEPENDS}
    10271163        ${GENSCRIPTS} a29k "$(tdir_a29k)"
     1164eaix5ppc.c: $(srcdir)/emulparams/aix5ppc.sh \
     1165  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
     1166        ${GENSCRIPTS} aix5ppc "$(tdir_aixppc)"
     1167eaix5rs6.c: $(srcdir)/emulparams/aix5rs6.sh \
     1168  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
     1169        ${GENSCRIPTS} aix5rs6 "$(tdir_aixrs6)"
    10281170eaixppc.c: $(srcdir)/emulparams/aixppc.sh \
    10291171  $(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
     
    10451187  $(srcdir)/emultempl/armelf_oabi.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    10461188        ${GENSCRIPTS} armelf_oabi "$(tdir_armelf)"
     1189earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \
     1190  $(srcdir)/emulparams/armelf.sh \
     1191  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
     1192  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1193        ${GENSCRIPTS} armelf_fbsd "$(tdir_armelf_fbsd)"
    10471194earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
    10481195  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
    10491196  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    10501197        ${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
     1198earmelf_nbsd.c: $(srcdir)/emulparams/armelf_nbsd.sh \
     1199  $(srcdir)/emulparams/armelf.sh \
     1200  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
     1201  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1202        ${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)"
     1203earmelfb_nbsd.c: $(srcdir)/emulparams/armelfb_nbsd.sh \
     1204  $(srcdir)/emulparams/armelf_nbsd.sh \
     1205  $(srcdir)/emulparams/armelf.sh \
     1206  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
     1207  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1208        ${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)"
    10511209earmaoutb.c:    $(srcdir)/emulparams/armaoutb.sh \
    10521210  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
     
    10611219  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
    10621220        ${GENSCRIPTS} armnbsd "$(tdir_armnbsd)"
     1221earmnto.c: $(srcdir)/emulparams/armnto.sh \
     1222  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
     1223  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1224        ${GENSCRIPTS} armnto "$(tdir_armnto)"
    10631225earm_epoc_pe.c: $(srcdir)/emulparams/arm_epoc_pe.sh \
    10641226  $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/epocpe.sc ${GEN_DEPENDS}
     
    10991261  ${GEN_DEPENDS}
    11001262        ${GENSCRIPTS} avrmega161 "$(tdir_avr85xx)"
     1263eavr1.c: $(srcdir)/emulparams/avr1.sh \
     1264  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
     1265  ${GEN_DEPENDS}
     1266        ${GENSCRIPTS} avr1 "$(tdir_avr85xx)"
     1267eavr2.c: $(srcdir)/emulparams/avr2.sh \
     1268  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
     1269  ${GEN_DEPENDS}
     1270        ${GENSCRIPTS} avr2 "$(tdir_avr85xx)"
     1271eavr3.c: $(srcdir)/emulparams/avr3.sh \
     1272  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
     1273  ${GEN_DEPENDS}
     1274        ${GENSCRIPTS} avr3 "$(tdir_avr85xx)"
     1275eavr4.c: $(srcdir)/emulparams/avr4.sh \
     1276  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
     1277  ${GEN_DEPENDS}
     1278        ${GENSCRIPTS} avr4 "$(tdir_avr85xx)"
     1279eavr5.c: $(srcdir)/emulparams/avr5.sh \
     1280  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
     1281  ${GEN_DEPENDS}
     1282        ${GENSCRIPTS} avr5 "$(tdir_avr85xx)"
    11011283ecoff_sparc.c: $(srcdir)/emulparams/coff_sparc.sh \
    11021284  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sparccoff.sc ${GEN_DEPENDS}
     
    11061288        ${GENSCRIPTS} crisaout "$(tdir_cris)"
    11071289ecriself.c: $(srcdir)/emulparams/criself.sh \
    1108   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1290  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11091291        ${GENSCRIPTS} criself "$(tdir_cris)"
    11101292ecrislinux.c: $(srcdir)/emulparams/crislinux.sh \
     
    11121294        ${GENSCRIPTS} crislinux "$(tdir_cris)"
    11131295ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
    1114   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
     1296  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
    11151297        ${GENSCRIPTS} d10velf "$(tdir_d10v)"
    11161298ed30velf.c: $(srcdir)/emulparams/d30velf.sh \
     
    11261308  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
    11271309        ${GENSCRIPTS} delta68 "$(tdir_delta68)"
     1310eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \
     1311  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS}
     1312        ${GENSCRIPTS} elf32_dlx "$(tdir_elf32_dlx)"
    11281313eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \
    11291314  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS}
    11301315        ${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)"
     1316eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
     1317  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
     1318  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1319        ${GENSCRIPTS} elf32xstormy16 "$(tdir_xstormy16)"
     1320eelf32vax.c: $(srcdir)/emulparams/elf32vax.sh \
     1321  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1322        ${GENSCRIPTS} elf32vax "$(tdir_elf32vax)"
     1323eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh \
     1324  $(srcdir)/emulparams/xtensa-config.sh \
     1325  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/xtensaelf.em \
     1326  $(srcdir)/scripttempl/elfxtensa.sc ${GEN_DEPENDS}
     1327        ${GENSCRIPTS} elf32xtensa "$(tdir_elf32xtensa)"
    11311328eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \
    11321329  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11331330        ${GENSCRIPTS} elf32fr30 "$(tdir_fr30)"
     1331eelf32frv.c: $(srcdir)/emulparams/elf32frv.sh \
     1332  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1333        ${GENSCRIPTS} elf32frv "$(tdir_frv)"
    11341334eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
    11351335  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11361336        ${GENSCRIPTS} elf32mcore "$(tdir_mcore)"
    11371337em32relf.c: $(srcdir)/emulparams/m32relf.sh \
    1138   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1338  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11391339        ${GENSCRIPTS} m32relf "$(tdir_m32r)"
    11401340eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
     
    11481348        ${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)"
    11491349eelf32b4300.c: $(srcdir)/emulparams/elf32b4300.sh \
     1350  $(srcdir)/emulparams/elf32bmip.sh \
    11501351  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11511352        ${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
     
    11541355        ${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
    11551356eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
     1357  $(srcdir)/emulparams/elf32bmip.sh \
    11561358  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11571359        ${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
    11581360eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
     1361  $(srcdir)/emulparams/elf32bmip.sh \
    11591362  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11601363        ${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
     1364eelf32btsmipn32.c: $(srcdir)/emulparams/elf32btsmipn32.sh \
     1365  $(srcdir)/emulparams/elf32bmip.sh \
     1366  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1367        ${GENSCRIPTS} elf32btsmipn32 "$(tdir_elf32btsmipn32)"
    11611368eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
     1369  $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
    11621370  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11631371        ${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
     1372eelf32ltsmipn32.c: $(srcdir)/emulparams/elf32ltsmipn32.sh \
     1373  $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
     1374  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1375        ${GENSCRIPTS} elf32ltsmipn32 "$(tdir_elf32ltsmipn32)"
    11641376eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
     1377  $(srcdir)/emulparams/elf32bmip.sh \
    11651378  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11661379        ${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
    11671380eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
     1381  $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
    11681382  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11691383        ${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
     
    11721386        ${GENSCRIPTS} elf32bmipn32 "$(tdir_elf32bmipn32)"
    11731387eelf32l4300.c: $(srcdir)/emulparams/elf32l4300.sh \
     1388  $(srcdir)/emulparams/elf32b4300.sh $(srcdir)/emulparams/elf32bmip.sh \
    11741389  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11751390        ${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
    11761391eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
     1392  $(srcdir)/emulparams/elf32bmip.sh \
    11771393  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11781394        ${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
    11791395eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
     1396  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
    11801397  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11811398        ${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
     1399eelf32lppcnto.c: $(srcdir)/emulparams/elf32lppcnto.sh \
     1400  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
     1401  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1402        ${GENSCRIPTS} elf32lppcnto "$(tdir_elf32lppcnto)"
    11821403eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \
     1404  $(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
     1405  $(srcdir)/emultempl/ppc32elf.em \
    11831406  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11841407        ${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)"
     1408eelf32ppcnto.c: $(srcdir)/emulparams/elf32ppcnto.sh \
     1409  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
     1410  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1411        ${GENSCRIPTS} elf32ppcnto "$(tdir_elf32ppcnto)"
     1412eelf32ppcwindiss.c: $(srcdir)/emulparams/elf32ppcwindiss.sh \
     1413  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1414        ${GENSCRIPTS} elf32ppcwindiss "$(tdir_elf32ppcwindiss)"
    11851415eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
     1416  $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
    11861417  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11871418        ${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
    1188 eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
     1419eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \
     1420  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1421        ${GENSCRIPTS} elf32openrisc "$(tdir_openrisc)"
     1422eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
    11891423  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11901424        ${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
     1425eelf32ppc_fbsd.c: $(srcdir)/emulparams/elf32ppc_fbsd.sh \
     1426  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
     1427  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1428        ${GENSCRIPTS} elf32ppc_fbsd "$(tdir_elf32ppc_fbsd)"
    11911429eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
     1430  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
    11921431  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11931432        ${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)"
    11941433eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
     1434  $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
    11951435  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    11961436        ${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
     1437eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
     1438  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1439        ${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)"
     1440eelf64lppc.c: $(srcdir)/emulparams/elf64lppc.sh \
     1441  $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
     1442  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1443        ${GENSCRIPTS} elf64lppc "$(tdir_elf64lppc)"
    11971444eelf32i370.c: $(srcdir)/emulparams/elf32i370.sh \
    11981445  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS}
    11991446        ${GENSCRIPTS} elf32i370 "$(tdir_elf32i370)"
     1447eelf32ip2k.c: $(srcdir)/emulparams/elf32ip2k.sh \
     1448  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/ip2k.sc ${GEN_DEPENDS}
     1449        ${GENSCRIPTS} elf32ip2k "$(tdir_ip2k)"
     1450eelf32iq2000.c: $(srcdir)/emulparams/elf32iq2000.sh \
     1451  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
     1452        ${GENSCRIPTS} elf32iq2000 "$(tdir_iq2000)"
     1453eelf32iq10.c: $(srcdir)/emulparams/elf32iq10.sh \
     1454  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
     1455        ${GENSCRIPTS} elf32iq10 "$(tdir_iq10)"
    12001456eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
    12011457  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    12021458        ${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
     1459eelf64alpha_fbsd.c: $(srcdir)/emulparams/elf64alpha_fbsd.sh \
     1460  $(srcdir)/emulparams/elf64alpha.sh \
     1461  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1462        ${GENSCRIPTS} elf64alpha_fbsd "$(tdir_elf64alpha_fbsd)"
     1463eelf64alpha_nbsd.c: $(srcdir)/emulparams/elf64alpha_nbsd.sh \
     1464  $(srcdir)/emulparams/elf64alpha.sh \
     1465  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1466        ${GENSCRIPTS} elf64alpha_nbsd "$(tdir_elf64alpha_nbsd)"
    12031467eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \
     1468  $(srcdir)/emulparams/hppa64linux.sh \
    12041469  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    12051470        ${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)"
     1471eelf64_aix.c: $(srcdir)/emulparams/elf64_aix.sh \
     1472  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1473        ${GENSCRIPTS} elf64_aix "$(tdir_elf64_aix)"
    12061474eelf64_ia64.c: $(srcdir)/emulparams/elf64_ia64.sh \
    1207   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1475  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
     1476  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    12081477        ${GENSCRIPTS} elf64_ia64 "$(tdir_elf64_ia64)"
     1478eelf64_ia64_fbsd.c: $(srcdir)/emulparams/elf64_ia64_fbsd.sh \
     1479  $(srcdir)/emulparams/elf64_ia64.sh \
     1480  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
     1481  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1482        ${GENSCRIPTS} elf64_ia64_fbsd "$(tdir_elf64_ia64_fbsd)"
     1483eelf64_s390.c: $(srcdir)/emulparams/elf64_s390.sh \
     1484  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1485        ${GENSCRIPTS} elf64_s390 "$(tdir_elf64_s390)"
    12091486eelf64_sparc.c: $(srcdir)/emulparams/elf64_sparc.sh \
    12101487  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    12111488        ${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
     1489eelf64_sparc_fbsd.c: $(srcdir)/emulparams/elf64_sparc_fbsd.sh \
     1490  $(srcdir)/emulparams/elf64_sparc.sh \
     1491  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1492        ${GENSCRIPTS} elf64_sparc_fbsd "$(tdir_elf64_sparc_fbsd)"
    12121493eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
     1494  $(srcdir)/emulparams/elf32bmipn32.sh \
    12131495  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    12141496        ${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
     1497eelf64mmix.c: $(srcdir)/emulparams/elf64mmix.sh \
     1498  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/mmix-elfnmmo.em \
     1499  $(srcdir)/emultempl/mmixelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1500        ${GENSCRIPTS} elf64mmix "$(tdir_elf64mmix)"
     1501emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \
     1502  $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mmo.em \
     1503  $(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS}
     1504        ${GENSCRIPTS} mmo "$(tdir_mmo)"
    12151505eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
     1506  $(srcdir)/emulparams/elf32bmipn32.sh \
    12161507  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    12171508        ${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
    12181509eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
     1510  $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf32bmipn32.sh \
    12191511  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    12201512        ${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
     
    12251517  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    12261518        ${GENSCRIPTS} elf_x86_64 "$(tdir_elf_x86_64)"
     1519eelf_x86_64_fbsd.c: $(srcdir)/emulparams/elf_x86_64_fbsd.sh \
     1520  $(srcdir)/emulparams/elf_x86_64.sh \
     1521  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1522        ${GENSCRIPTS} elf_x86_64_fbsd "$(tdir_elf_x86_64_fbsd)"
    12271523eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
    12281524  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    12291525        ${GENSCRIPTS} elf_i386_be "$(tdir_elf_i386_be)"
    12301526eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
    1231   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1527  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS}
    12321528        ${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)"
     1529eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \
     1530  $(srcdir)/emulparams/elf_i386.sh \
     1531  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1532        ${GENSCRIPTS} elf_i386_fbsd "$(tdir_elf_i386_fbsd)"
     1533eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
     1534  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1535        ${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
     1536eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
     1537  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1538        ${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)"
    12331539egld960.c: $(srcdir)/emulparams/gld960.sh \
    12341540  $(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
     
    12461552  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300s.sc ${GEN_DEPENDS}
    12471553        ${GENSCRIPTS} h8300s "$(tdir_h8300s)"
     1554eh8300hn.c: $(srcdir)/emulparams/h8300hn.sh \
     1555  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300hn.sc ${GEN_DEPENDS}
     1556        ${GENSCRIPTS} h8300hn "$(tdir_h8300hn)"
     1557eh8300sn.c: $(srcdir)/emulparams/h8300sn.sh \
     1558  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sn.sc ${GEN_DEPENDS}
     1559        ${GENSCRIPTS} h8300sn "$(tdir_h8300sn)"
     1560eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \
     1561  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1562        ${GENSCRIPTS} h8300elf "$(tdir_h8300elf)"
     1563eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \
     1564  $(srcdir)/emulparams/h8300elf.sh \
     1565  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1566        ${GENSCRIPTS} h8300helf "$(tdir_h8300helf)"
     1567eh8300self.c: $(srcdir)/emulparams/h8300self.sh \
     1568  $(srcdir)/emulparams/h8300elf.sh \
     1569  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1570        ${GENSCRIPTS} h8300self "$(tdir_h8300self)"
     1571eh8300hnelf.c: $(srcdir)/emulparams/h8300hnelf.sh \
     1572  $(srcdir)/emulparams/h8300elf.sh \
     1573  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1574        ${GENSCRIPTS} h8300hnelf "$(tdir_h8300hnelf)"
     1575eh8300snelf.c: $(srcdir)/emulparams/h8300snelf.sh \
     1576  $(srcdir)/emulparams/h8300elf.sh \
     1577  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1578        ${GENSCRIPTS} h8300snelf "$(tdir_h8300snelf)"
    12481579eh8500.c: $(srcdir)/emulparams/h8500.sh \
    12491580  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
     
    12751606  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    12761607        ${GENSCRIPTS} hppalinux "$(tdir_hppalinux)"
     1608ehppanbsd.c: $(srcdir)/emulparams/hppanbsd.sh \
     1609  $(srcdir)/emulparams/hppaelf.sh \
     1610  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
     1611  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1612        ${GENSCRIPTS} hppanbsd "$(tdir_hppanbsd)"
     1613ehppaobsd.c: $(srcdir)/emulparams/hppaobsd.sh \
     1614  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
     1615  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1616        ${GENSCRIPTS} hppaobsd "$(tdir_hppaobsd)"
     1617ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \
     1618  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1619        ${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)"
    12771620ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
    12781621  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
     
    13001643        ${GENSCRIPTS} i386mach "$(tdir_i386mach)"
    13011644ei386moss.c: $(srcdir)/emulparams/i386moss.sh \
    1302   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1645  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    13031646        ${GENSCRIPTS} i386moss "$(tdir_i386moss)"
    13041647ei386msdos.c: $(srcdir)/emulparams/i386msdos.sh \
     
    13081651  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
    13091652        ${GENSCRIPTS} i386nbsd "$(tdir_i386nbsd)"
     1653ei386nto.c:     $(srcdir)/emulparams/i386nto.sh \
     1654  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1655        ${GENSCRIPTS} i386nto "$(tdir_i386nto)"
    13101656ei386nw.c:      $(srcdir)/emulparams/i386nw.sh \
    13111657  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
     
    13511697  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    13521698        ${GENSCRIPTS} m68kelf "$(tdir_m68kelf)"
     1699em68kelfnbsd.c: $(srcdir)/emulparams/m68kelfnbsd.sh \
     1700  $(srcdir)/emulparams/m68kelf.sh \
     1701  $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \
     1702  $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1703        ${GENSCRIPTS} m68kelfnbsd "$(tdir_m68kelfnbsd)"
    13531704em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
    13541705  $(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
     
    13911742        ${GENSCRIPTS} mipspe "$(tdir_mips)"
    13921743emn10300.c: $(srcdir)/emulparams/mn10300.sh \
     1744  $(srcdir)/emulparams/mn10200.sh \
    13931745  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    13941746        ${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
     
    13961748  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    13971749        ${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
     1750emsp430x1101.c: $(srcdir)/emulparams/msp430x1101.sh \
     1751  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1752  ${GEN_DEPENDS}
     1753        ${GENSCRIPTS} msp430x1101 "$(tdir_msp430x1101)"
     1754emsp430x1111.c: $(srcdir)/emulparams/msp430x1111.sh \
     1755  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1756  ${GEN_DEPENDS}
     1757        ${GENSCRIPTS} msp430x1111 "$(tdir_msp430x1111)"
     1758emsp430x1121.c: $(srcdir)/emulparams/msp430x1121.sh \
     1759  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1760  ${GEN_DEPENDS}
     1761        ${GENSCRIPTS} msp430x1121 "$(tdir_msp430x1121)"
     1762emsp430x1122.c: $(srcdir)/emulparams/msp430x1122.sh \
     1763  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1764  ${GEN_DEPENDS}
     1765        ${GENSCRIPTS} msp430x1122 "$(tdir_msp430x1122)"
     1766emsp430x1132.c: $(srcdir)/emulparams/msp430x1132.sh \
     1767  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1768  ${GEN_DEPENDS}
     1769        ${GENSCRIPTS} msp430x1132 "$(tdir_msp430x1132)"
     1770emsp430x1331.c: $(srcdir)/emulparams/msp430x1331.sh \
     1771  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1772  ${GEN_DEPENDS}
     1773        ${GENSCRIPTS} msp430x1331 "$(tdir_msp430x1331)"
     1774emsp430x1351.c: $(srcdir)/emulparams/msp430x1351.sh \
     1775  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1776  ${GEN_DEPENDS}
     1777        ${GENSCRIPTS} msp430x1351 "$(tdir_msp430x1351)"
     1778emsp430x149.c: $(srcdir)/emulparams/msp430x149.sh \
     1779  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1780  ${GEN_DEPENDS}
     1781        ${GENSCRIPTS} msp430x149 "$(tdir_msp430x149)"
     1782emsp430x148.c: $(srcdir)/emulparams/msp430x148.sh \
     1783  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1784  ${GEN_DEPENDS}
     1785        ${GENSCRIPTS} msp430x148 "$(tdir_msp430x148)"
     1786emsp430x449.c: $(srcdir)/emulparams/msp430x449.sh \
     1787  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1788  ${GEN_DEPENDS}
     1789        ${GENSCRIPTS} msp430x449 "$(tdir_msp430x449)"
     1790emsp430x448.c: $(srcdir)/emulparams/msp430x448.sh \
     1791  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1792  ${GEN_DEPENDS}
     1793        ${GENSCRIPTS} msp430x448 "$(tdir_msp430x448)"
     1794emsp430x447.c: $(srcdir)/emulparams/msp430x447.sh \
     1795  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1796  ${GEN_DEPENDS}
     1797        ${GENSCRIPTS} msp430x447 "$(tdir_msp430x447)"
     1798emsp430x412.c: $(srcdir)/emulparams/msp430x412.sh \
     1799  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1800  ${GEN_DEPENDS}
     1801        ${GENSCRIPTS} msp430x412 "$(tdir_msp430x412)"
     1802emsp430x413.c: $(srcdir)/emulparams/msp430x413.sh \
     1803  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1804  ${GEN_DEPENDS}
     1805        ${GENSCRIPTS} msp430x413 "$(tdir_msp430x413)"
     1806emsp430x147.c: $(srcdir)/emulparams/msp430x147.sh \
     1807  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1808  ${GEN_DEPENDS}
     1809        ${GENSCRIPTS} msp430x147 "$(tdir_msp430x147)"
     1810emsp430x135.c: $(srcdir)/emulparams/msp430x135.sh \
     1811  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1812  ${GEN_DEPENDS}
     1813        ${GENSCRIPTS} msp430x135 "$(tdir_msp430x135)"
     1814emsp430x133.c: $(srcdir)/emulparams/msp430x133.sh \
     1815  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1816  ${GEN_DEPENDS}
     1817        ${GENSCRIPTS} msp430x133 "$(tdir_msp430x133)"
     1818emsp430x110.c: $(srcdir)/emulparams/msp430x110.sh \
     1819  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1820  ${GEN_DEPENDS}
     1821        ${GENSCRIPTS} msp430x110 "$(tdir_msp430x110)"
     1822emsp430x112.c: $(srcdir)/emulparams/msp430x112.sh \
     1823  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1824  ${GEN_DEPENDS}
     1825        ${GENSCRIPTS} msp430x112 "$(tdir_msp430x112)"
     1826emsp430x122.c: $(srcdir)/emulparams/msp430x122.sh \
     1827  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1828  ${GEN_DEPENDS}
     1829        ${GENSCRIPTS} msp430x122 "$(tdir_msp430x122)"
     1830emsp430x1222.c: $(srcdir)/emulparams/msp430x1222.sh \
     1831  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1832  ${GEN_DEPENDS}
     1833        ${GENSCRIPTS} msp430x1222 "$(tdir_msp430x1222)"
     1834emsp430x123.c: $(srcdir)/emulparams/msp430x123.sh \
     1835  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1836  ${GEN_DEPENDS}
     1837        ${GENSCRIPTS} msp430x123 "$(tdir_msp430x123)"
     1838emsp430x1232.c: $(srcdir)/emulparams/msp430x1232.sh \
     1839  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1840  ${GEN_DEPENDS}
     1841        ${GENSCRIPTS} msp430x1232 "$(tdir_msp430x1232)"
     1842emsp430x311.c: $(srcdir)/emulparams/msp430x311.sh \
     1843  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
     1844  ${GEN_DEPENDS}
     1845        ${GENSCRIPTS} msp430x311 "$(tdir_msp430x311)"
     1846emsp430x312.c: $(srcdir)/emulparams/msp430x312.sh \
     1847  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
     1848  ${GEN_DEPENDS}
     1849        ${GENSCRIPTS} msp430x312 "$(tdir_msp430x312)"
     1850emsp430x313.c: $(srcdir)/emulparams/msp430x313.sh \
     1851  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
     1852  ${GEN_DEPENDS}
     1853        ${GENSCRIPTS} msp430x313 "$(tdir_msp430x313)"
     1854emsp430x314.c: $(srcdir)/emulparams/msp430x314.sh \
     1855  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
     1856  ${GEN_DEPENDS}
     1857        ${GENSCRIPTS} msp430x314 "$(tdir_msp430x314)"
     1858emsp430x315.c: $(srcdir)/emulparams/msp430x315.sh \
     1859  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
     1860  ${GEN_DEPENDS}
     1861        ${GENSCRIPTS} msp430x315 "$(tdir_msp430x315)"
     1862emsp430x323.c: $(srcdir)/emulparams/msp430x323.sh \
     1863  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
     1864  ${GEN_DEPENDS}
     1865        ${GENSCRIPTS} msp430x323 "$(tdir_msp430x323)"
     1866emsp430x325.c: $(srcdir)/emulparams/msp430x325.sh \
     1867  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
     1868  ${GEN_DEPENDS}
     1869        ${GENSCRIPTS} msp430x325 "$(tdir_msp430x325)"
     1870emsp430x336.c: $(srcdir)/emulparams/msp430x336.sh \
     1871  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
     1872  ${GEN_DEPENDS}
     1873        ${GENSCRIPTS} msp430x336 "$(tdir_msp430x336)"
     1874emsp430x337.c: $(srcdir)/emulparams/msp430x337.sh \
     1875  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
     1876  ${GEN_DEPENDS}
     1877        ${GENSCRIPTS} msp430x337 "$(tdir_msp430x337)"
     1878emsp430x435.c: $(srcdir)/emulparams/msp430x435.sh \
     1879  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1880  ${GEN_DEPENDS}
     1881        ${GENSCRIPTS} msp430x435 "$(tdir_msp430x435)"
     1882emsp430x436.c: $(srcdir)/emulparams/msp430x436.sh \
     1883  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1884  ${GEN_DEPENDS}
     1885        ${GENSCRIPTS} msp430x436 "$(tdir_msp430x436)"
     1886emsp430x437.c: $(srcdir)/emulparams/msp430x437.sh \
     1887  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1888  ${GEN_DEPENDS}
     1889        ${GENSCRIPTS} msp430x437 "$(tdir_msp430x437)"
     1890emsp430x167.c: $(srcdir)/emulparams/msp430x167.sh \
     1891  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1892  ${GEN_DEPENDS}
     1893        ${GENSCRIPTS} msp430x167 "$(tdir_msp430x167)"
     1894emsp430x168.c: $(srcdir)/emulparams/msp430x167.sh \
     1895  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1896  ${GEN_DEPENDS}
     1897        ${GENSCRIPTS} msp430x168 "$(tdir_msp430x168)"
     1898emsp430x169.c: $(srcdir)/emulparams/msp430x169.sh \
     1899  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1900  ${GEN_DEPENDS}
     1901        ${GENSCRIPTS} msp430x169 "$(tdir_msp430x169)"
     1902emsp430x155.c: $(srcdir)/emulparams/msp430x155.sh \
     1903  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1904  ${GEN_DEPENDS}
     1905        ${GENSCRIPTS} msp430x155 "$(tdir_msp430x155)"
     1906emsp430x156.c: $(srcdir)/emulparams/msp430x156.sh \
     1907  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1908  ${GEN_DEPENDS}
     1909        ${GENSCRIPTS} msp430x156 "$(tdir_msp430x156)"
     1910emsp430x157.c: $(srcdir)/emulparams/msp430x157.sh \
     1911  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
     1912  ${GEN_DEPENDS}
     1913        ${GENSCRIPTS} msp430x157 "$(tdir_msp430x157)"
    13981914enews.c: $(srcdir)/emulparams/news.sh \
    13991915  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
     
    14021918  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
    14031919        ${GENSCRIPTS} ns32knbsd "$(tdir_ns32knbsd)"
     1920eor32.c: $(srcdir)/emulparams/or32.sh \
     1921  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/or32.sc ${GEN_DEPENDS}
     1922        ${GENSCRIPTS} or32 "$(tdir_or32)"
     1923eor32elf.c: $(srcdir)/emulparams/or32elf.sh \
     1924  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1925        ${GENSCRIPTS} or32elf "$(tdir_or32elf)"
    14041926epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
    14051927  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
    14061928        ${GENSCRIPTS} pc532macha "$(tdir_pc532macha)"
     1929epdp11.c: $(srcdir)/emulparams/pdp11.sh \
     1930  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
     1931        ${GENSCRIPTS} pdp11 "$(tdir_pdp11)"
    14071932epjelf.c: $(srcdir)/emulparams/pjelf.sh \
    14081933  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     
    14321957  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    14331958        ${GENSCRIPTS} shelf "$(tdir_shelf)"
     1959eshelf32.c: $(srcdir)/emulparams/shelf32.sh \
     1960  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
     1961  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
     1962  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1963        ${GENSCRIPTS} shelf32 "$(tdir_shelf32)"
     1964eshelf32_linux.c: $(srcdir)/emulparams/shelf32_linux.sh \
     1965  $(srcdir)/emulparams/shelf32.sh \
     1966  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
     1967  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
     1968  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1969        ${GENSCRIPTS} shelf32_linux "$(tdir_shelf32_linux)"
     1970eshelf32_nbsd.c: $(srcdir)/emulparams/shelf32_nbsd.sh \
     1971  $(srcdir)/emulparams/shelf32.sh \
     1972  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
     1973  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
     1974  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1975        ${GENSCRIPTS} shelf32_nbsd "$(tdir_shelf32_nbsd)"
     1976eshelf64.c: $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
     1977  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1978        ${GENSCRIPTS} shelf64 "$(tdir_shelf64)"
     1979eshelf64_nbsd.c: $(srcdir)/emulparams/shelf64_nbsd.sh \
     1980  $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
     1981  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1982        ${GENSCRIPTS} shelf64_nbsd "$(tdir_shelf64_nbsd)"
    14341983eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
     1984  $(srcdir)/emulparams/shlelf_linux.sh \
    14351985  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    14361986        ${GENSCRIPTS} shelf_linux "$(tdir_shelf_linux)"
     
    14381988  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    14391989        ${GENSCRIPTS} shlelf_linux "$(tdir_shlelf_linux)"
     1990eshelf_nbsd.c: $(srcdir)/emulparams/shelf_nbsd.sh \
     1991  $(srcdir)/emulparams/shelf.sh \
     1992  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1993        ${GENSCRIPTS} shelf_nbsd "$(tdir_shelf_nbsd)"
     1994eshelf_nto.c: $(srcdir)/emulparams/shelf_nto.sh \
     1995  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     1996        ${GENSCRIPTS} shelf_nto "$(tdir_shelf_nto)"
     1997eshlelf_nbsd.c: $(srcdir)/emulparams/shlelf_nbsd.sh \
     1998  $(srcdir)/emulparams/shelf_nbsd.sh \
     1999  $(srcdir)/emulparams/shelf.sh \
     2000  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     2001        ${GENSCRIPTS} shlelf_nbsd "$(tdir_shlelf_nbsd)"
     2002eshlelf_nto.c: $(srcdir)/emulparams/shlelf_nto.sh \
     2003  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     2004        ${GENSCRIPTS} shlelf_nto "$(tdir_shlelf_nto)"
    14402005eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
     2006  $(srcdir)/emulparams/shelf.sh \
    14412007  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
    14422008        ${GENSCRIPTS} shlelf "$(tdir_shlelf)"
     2009eshlelf32.c: $(srcdir)/emulparams/shlelf32.sh \
     2010  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h $(srcdir)/emulparams/shelf32.sh \
     2011  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
     2012  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     2013        ${GENSCRIPTS} shlelf32 "$(tdir_shlelf32)"
     2014eshlelf32_linux.c: $(srcdir)/emulparams/shlelf32_linux.sh \
     2015  $(srcdir)/emulparams/shelf32_linux.sh $(srcdir)/emulparams/shelf32.sh \
     2016  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
     2017  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
     2018  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     2019        ${GENSCRIPTS} shlelf32_linux "$(tdir_shlelf32_linux)"
     2020eshlelf32_nbsd.c: $(srcdir)/emulparams/shlelf32_nbsd.sh \
     2021  $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
     2022  $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
     2023  $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
     2024  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     2025        ${GENSCRIPTS} shlelf32_nbsd "$(tdir_shlelf32_nbsd)"
     2026eshlelf64.c: $(srcdir)/emulparams/shlelf64.sh \
     2027  $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
     2028  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     2029        ${GENSCRIPTS} shlelf64 "$(tdir_shlelf64)"
     2030eshlelf64_nbsd.c: $(srcdir)/emulparams/shlelf64_nbsd.sh \
     2031  $(srcdir)/emulparams/shelf64_nbsd.sh \
     2032  $(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
     2033  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
     2034        ${GENSCRIPTS} shlelf64_nbsd "$(tdir_shlelf64_nbsd)"
    14432035eshl.c: $(srcdir)/emulparams/shl.sh \
     2036  $(srcdir)/emulparams/sh.sh \
    14442037  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
    14452038        ${GENSCRIPTS} shl "$(tdir_shl)"
     
    14742067  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/tic30coff.sc ${GEN_DEPENDS}
    14752068        ${GENSCRIPTS} tic30coff "$(tdir_tic30coff)"
     2069etic3xcoff.c: $(srcdir)/emulparams/tic3xcoff.sh \
     2070  $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
     2071        ${GENSCRIPTS} tic3xcoff "$(tdir_tic4xcoff)"
     2072etic3xcoff_onchip.c: $(srcdir)/emulparams/tic3xcoff_onchip.sh \
     2073  $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
     2074        ${GENSCRIPTS} tic3xcoff_onchip "$(tdir_tic4xcoff)"
     2075etic4xcoff.c: $(srcdir)/emulparams/tic4xcoff.sh \
     2076  $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic4xcoff.sc ${GEN_DEPENDS}
     2077        ${GENSCRIPTS} tic4xcoff "$(tdir_tic4xcoff)"
    14762078etic54xcoff.c: $(srcdir)/emulparams/tic54xcoff.sh \
    14772079  $(srcdir)/emultempl/ticoff.em $(srcdir)/scripttempl/tic54xcoff.sc ${GEN_DEPENDS}
     
    14862088  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
    14872089        ${GENSCRIPTS} vax "$(tdir_vax)"
     2090evaxnbsd.c: $(srcdir)/emulparams/vaxnbsd.sh \
     2091  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
     2092        ${GENSCRIPTS} vaxnbsd "$(tdir_vaxnbsd)"
    14882093evsta.c: $(srcdir)/emulparams/vsta.sh \
    14892094  $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
     
    16032208          MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
    16042209
    1605 # We want to reconfigure if configure.host or configure.tgt changes.
    1606 config.status: $(srcdir)/configure $(srcdir)/configure.host $(srcdir)/configure.tgt
    1607         $(SHELL) ./config.status --recheck
     2210# Build the man page from the texinfo file
     2211# The sed command removes the no-adjust Nroff command so that
     2212# the man output looks standard.
     2213ld.1: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
     2214        touch $@
     2215        -$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
     2216        -($(POD2MAN) ld.pod | \
     2217                sed -e '/^.if n .na/d' > $@.T$$$$ && \
     2218                mv -f $@.T$$$$ $@) || \
     2219                (rm -f $@.T$$$$ && exit 1)
     2220        rm -f ld.pod
    16082221mostlyclean-local:
    16092222        -rm -rf tmpdir
     
    16122225
    16132226install-exec-local: ld-new$(EXEEXT)
    1614         $(mkinstalldirs) $(bindir) $(tooldir)/bin
     2227        $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(tooldir)/bin
    16152228        @list='$(noinst_PROGRAMS)'; for p in $$list; do \
    16162229          if test -f $$p; then \
    16172230            echo " $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
    1618             $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
     2231            $(LIBTOOL)  --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
    16192232          else :; fi; \
    16202233        done
    16212234        n=`echo ld | sed '$(transform)'`; \
    16222235        if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \
    1623           rm -f $(tooldir)/bin/ld$(EXEEXT); \
    1624           ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
    1625           || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT); \
     2236          rm -f $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
     2237          ln $(DESTDIR)$(bindir)/$$n$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
     2238          || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(DESTDIR)$(tooldir)/bin/ld$(EXEEXT); \
    16262239        fi
    16272240
    16282241install-data-local:
    1629         $(mkinstalldirs) $(scriptdir)/ldscripts
     2242        $(mkinstalldirs) $(DESTDIR)$(scriptdir)/ldscripts
    16302243        for f in ldscripts/*; do \
    1631           $(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
     2244          $(INSTALL_DATA) $$f $(DESTDIR)$(scriptdir)/$$f ; \
    16322245        done
    1633 diststuff: $(LDDISTSTUFF) info
     2246
     2247# We want install to imply install-info as per GNU standards, despite the
     2248# cygnus option.
     2249install: install-info
     2250diststuff: info $(EXTRA_DIST)
    16342251distclean-local:
    16352252        rm -rf ldscripts
     2253
     2254Makefile: $(BFDDIR)/configure.in
    16362255
    16372256# Targets to rebuild dependencies in this Makefile.
     
    16572276        sed <$(srcdir)/dep-in.sed >dep.sed      \
    16582277                -e 's!@INCDIR@!$(INCDIR)!'      \
    1659                 -e 's!@SRCDIR@!$(srcdir)!'
     2278                -e 's!@BFDDIR@!$(BFDDIR)!'      \
     2279                -e 's!@SRCDIR@!$(srcdir)!'      \
     2280                -e 's!@TOPDIR@!'`echo $(srcdir) | sed -e s,/ld$$,,`'!'
    16602281
    16612282dep: DEP
     
    16762297.PHONY: dep dep-in dep-am
    16772298
     2299@MAINT@.PHONY: mpw
     2300@MAINT@mpw: $(srcdir)/mpw-ei386go32.c $(srcdir)/mpw-elfmips.c \
     2301@MAINT@ $(srcdir)/mpw-em68kcoff.c $(srcdir)/mpw-eppcmac.c \
     2302@MAINT@ $(srcdir)/mpw-esh.c $(srcdir)/mpw-idtmips.c
     2303@MAINT@
     2304@MAINT@$(srcdir)/mpw-ei386go32.c: ei386go32.c
     2305@MAINT@ $(srcdir)/../move-if-change $< $@
     2306@MAINT@
     2307@MAINT@$(srcdir)/mpw-elfmips.c: eelf32ebmip.c
     2308@MAINT@ $(srcdir)/../move-if-change $< $@
     2309@MAINT@
     2310@MAINT@$(srcdir)/mpw-em68kcoff.c: em68kcoff.c
     2311@MAINT@ $(srcdir)/../move-if-change $< $@
     2312@MAINT@
     2313@MAINT@$(srcdir)/mpw-eppcmac.c: eppcmacos.c
     2314@MAINT@ $(srcdir)/../move-if-change $< $@
     2315@MAINT@
     2316@MAINT@$(srcdir)/mpw-esh.c: esh.c
     2317@MAINT@ $(srcdir)/../move-if-change $< $@
     2318@MAINT@
     2319@MAINT@$(srcdir)/mpw-idtmips.c: emipsidt.c
     2320@MAINT@ $(srcdir)/../move-if-change $< $@
     2321
    16782322# What appears below is generated by a hacked mkdep using gcc -MM.
    16792323
     
    16812325# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
    16822326ldctor.o: ldctor.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
    1683   sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
    1684   ld.h $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldmisc.h \
    1685   ldgram.h ldmain.h ldctor.h
     2327  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
     2328  $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h $(INCDIR)/bin-bugs.h \
     2329  ldexp.h ldlang.h ldmisc.h ldgram.h ldmain.h ldctor.h
    16862330ldemul.o: ldemul.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
     2331  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
     2332  ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \
     2333  ldfile.h ldemul.h ldmain.h ldemul-list.h
     2334ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
     2335  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
     2336  $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
     2337  ldmisc.h ldexp.h ldgram.h ldlang.h $(INCDIR)/libiberty.h \
     2338  $(INCDIR)/safe-ctype.h
     2339ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
     2340  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
     2341  $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h $(INCDIR)/bin-bugs.h \
     2342  ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h \
     2343  ldlex.h ldemul.h $(INCDIR)/libiberty.h $(INCDIR)/filenames.h
     2344ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
     2345  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
     2346  $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h \
     2347  $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
     2348  ldexp.h ldlang.h ldgram.h ldlex.h ldmisc.h ldctor.h \
     2349  ldfile.h ldemul.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h
     2350ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
     2351  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
     2352  $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h $(INCDIR)/progress.h \
     2353  $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h ld.h $(INCDIR)/bin-bugs.h \
     2354  ldmain.h ldmisc.h ldwrite.h ldexp.h ldlang.h ldgram.h \
     2355  ldlex.h ldfile.h ldemul.h ldctor.h
     2356ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
     2357  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
     2358  $(INCDIR)/libiberty.h $(INCDIR)/demangle.h ld.h $(INCDIR)/bin-bugs.h \
     2359  ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h \
     2360  ldfile.h
     2361ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
     2362  $(INCDIR)/symcat.h ../bfd/bfdver.h sysdep.h config.h \
     2363  $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h ldver.h \
     2364  ldexp.h ldlang.h ldfile.h ldemul.h ldmain.h
     2365ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
     2366  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
     2367  $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h \
     2368  ldexp.h ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h
     2369lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
     2370  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
     2371  $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h \
     2372  ld.h $(INCDIR)/bin-bugs.h ldmain.h ldmisc.h ldexp.h \
     2373  ldlang.h ldgram.h ldlex.h ldfile.h ldver.h ldemul.h \
     2374  $(INCDIR)/demangle.h
     2375mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
    16872376  sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
    1688   ldmisc.h ldexp.h ldlang.h ldfile.h ldemul.h ldmain.h \
    1689   ldemul-list.h
    1690 ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
    1691   sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
    1692   ld.h $(INCDIR)/bin-bugs.h ldmain.h ldmisc.h ldexp.h \
    1693   ldgram.h ldlang.h
    1694 ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
    1695   sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
    1696   ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \
    1697   ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h $(INCDIR)/libiberty.h
    1698 ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
    1699   sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
    1700   $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \
    1701   ldmain.h ldgram.h ldexp.h ldlang.h ldlex.h ldmisc.h \
    1702   ldctor.h ldfile.h ldemul.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h
    1703 ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
    1704   sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
    1705   $(INCDIR)/progress.h $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h \
    1706   ld.h $(INCDIR)/bin-bugs.h ldmain.h ldmisc.h ldwrite.h \
    1707   ldgram.h ldexp.h ldlang.h ldlex.h ldfile.h ldemul.h \
    1708   ldctor.h
    1709 ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
    1710   sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
    1711   $(INCDIR)/demangle.h ld.h $(INCDIR)/bin-bugs.h ldmisc.h \
    1712   ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h ldfile.h
    1713 ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
    1714   sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
    1715   ldver.h ldexp.h ldlang.h ldfile.h ldemul.h ldmain.h
    1716 ldwrite.o: ldwrite.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
    1717   sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
    1718   $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \
    1719   ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h
    1720 lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
    1721   sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
    1722   $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
    1723   ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \
    1724   ldver.h ldemul.h $(INCDIR)/demangle.h
    1725 mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h sysdep.h \
    1726   config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
    17272377  ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h
    17282378ldcref.o: ldcref.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
    1729   sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
    1730   $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
    1731   ldmisc.h ldexp.h ldlang.h
     2379  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
     2380  $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h \
     2381  ldmain.h ldmisc.h ldexp.h ldlang.h
    17322382pe-dll.o: pe-dll.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
    1733   sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
    1734   $(INCDIR)/libiberty.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \
    1735   ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h ldfile.h \
    1736   ldemul.h $(INCDIR)/coff/internal.h ../bfd/libcoff.h \
    1737   deffile.h pe-dll.h
     2383  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
     2384  $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
     2385  ld.h $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldwrite.h \
     2386  ldmisc.h ldgram.h ldmain.h ldfile.h ldemul.h $(INCDIR)/coff/internal.h \
     2387  $(BFDDIR)/libcoff.h deffile.h pe-dll.h
    17382388ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
    1739   sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
    1740   ld.h $(INCDIR)/bin-bugs.h ldexp.h ldver.h ldlang.h \
    1741   ldfile.h ldemul.h ldmisc.h ldmain.h mri.h ldctor.h \
    1742   ldlex.h
    1743 ldlex.o: ldlex.c ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \
    1744   ld.h $(INCDIR)/bin-bugs.h ldgram.h ldmisc.h ldexp.h \
    1745   ldlang.h ldfile.h ldlex.h ldmain.h $(INCDIR)/libiberty.h
     2389  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
     2390  $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \
     2391  ldver.h ldlang.h ldfile.h ldemul.h ldmisc.h ldmain.h \
     2392  mri.h ldctor.h ldlex.h
     2393ldlex.o: ldlex.c $(INCDIR)/ansidecl.h ../bfd/bfd.h \
     2394  $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
     2395  $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \
     2396  ldmisc.h ldexp.h ldlang.h ldgram.h ldfile.h ldlex.h \
     2397  ldmain.h $(INCDIR)/libiberty.h
    17462398deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
    1747   ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \
    1748   ld.h $(INCDIR)/bin-bugs.h ldmisc.h deffile.h
     2399  $(INCDIR)/safe-ctype.h ../bfd/bfd.h $(INCDIR)/symcat.h \
     2400  sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
     2401  ldmisc.h deffile.h
    17492402# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
    17502403
  • trunk/src/binutils/ld/configure.host

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r617 r618  
    88#  HOSTING_CRT0         crt0.o file used for bootstrapping
    99#  HOSTING_LIBS         libraries used for bootstrapping
    10 #  NATIVE_LIB_DIRS      library directories to search on this host
    1110
    1211HDEFINES=
    1312HOSTING_CRT0=/lib/crt0.o
    14 HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc'
    15 NATIVE_LIB_DIRS=
     13HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ]; then libgcc=../gcc/libgcc.a; else libgcc=\`${CC} -print-libgcc-file-name\`; fi; if [ -f ../gcc/libgcc_eh.a ]; then libgcc="$libgcc ../gcc/libgcc_eh.a"; else libgcc_eh=\`${CC} -print-file-name=libgcc_eh.a\`; if [ x"$libgcc_eh" != xlibgcc_eh.a ]; then libgcc="$libgcc $libgcc_eh"; fi; fi; echo $libgcc -lc $libgcc`'
     14
     15#
     16#       Generic configurations:
     17#
    1618
    1719case "${host}" in
    1820
    19 alpha*-*-linux-gnu*)
    20   HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[   ][      ]*\(.*/ld[^ ]*.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
    21   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
     21*-*-freebsd*)
     22  # Older versions of gcc do not use a specs file.  In those cases,
     23  # gcc -print-file-name=specs will simply print specs.  We create a
     24  # dummy specs files to handle this.
     25  echo "-dynamic-linker `${CC} --print-file-name=ld-elf.so.1`" > specs
     26  HOSTING_CRT0='-dynamic-linker `${CC} --print-prog-name=ld-elf.so.1` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `${CC} --print-file-name=crtbegin.o`'
     27  HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
     28  ;;
     29
     30*-*-linux*aout* | *-*-linux*oldld)
     31  HOSTING_CRT0=/usr/lib/crt0.o
     32  ;;
     33
     34*-*-linux*libc1*)
     35  HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
     36  HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
     37  ;;
     38
     39*-*-linux*)
     40  HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[   ][      ]*\(.*/ld[^ ]*\.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
     41  HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
     42  ;;
     43
     44esac
     45
     46#
     47# Now more specific configurations
     48#
     49
     50case "${host}" in
     51
     52*-*-linux*aout* | *-*-linux*oldld | *-*-linux*libc1*)
     53  # No further tweaking needed
    2254  ;;
    2355
    2456alpha*-*-netbsd*)
    25   # The new BSD `make' has a bug: it doesn't pass empty arguments in
    26   # shell commands.  So we need to make this value non-empty in order
    27   # for the genscripts.sh call to work.  There's nothing magic about
    28   # the value `/lib'; it's just a dummy.
    29   NATIVE_LIB_DIRS=/lib
    3057  HOSTING_CRT0=/usr/lib/crt0.o
    3158  ;;
    3259
    3360arm*-*-linux-gnu*)
    34   HOSTING_CRT0='-p -dynamic-linker `fgrep ld-linux.so \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[  ][      ]*\(.*/ld-linux.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
    35   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
     61  HOSTING_CRT0='-p '`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux,g"`
     62  ;;
     63
     64hppa*64*-*-hpux11*)
     65  HOSTING_CRT0=/usr/ccs/lib/pa20_64/crt0.o
     66  # Even if CC is not gcc, the tests use gcc.
     67  HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else if test "$GCC" = yes; then ${CC} --print-libgcc-file-name; else gcc --print-libgcc-file-name; fi fi` -lc /usr/lib/pa20_64/milli.a'
    3668  ;;
    3769
    3870i[3456]86-*-bsd* | i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12]\.* | i[34567]86-*-freebsd*aout* | i[3456]86-*-netbsd*)
    39   # The new BSD `make' has a bug: it doesn't pass empty arguments in
    40   # shell commands.  So we need to make this value non-empty in order
    41   # for the genscripts.sh call to work.  There's nothing magic about
    42   # the value `/lib'; it's just a dummy.
    43   NATIVE_LIB_DIRS=/lib
    4471  HOSTING_CRT0=/usr/lib/crt0.o
    4572  ;;
     
    4774i[3456]86-*-sysv4*)
    4875  HOSTING_CRT0='/usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
    49   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /usr/ccs/lib/crtn.o'
    50   NATIVE_LIB_DIRS=/usr/ccs/lib
     76  HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /usr/ccs/lib/crtn.o'
    5177  ;;
    5278
    5379i[3456]86-sequent-ptx* | i[3456]86-sequent-sysv*)
    5480  HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
    55   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi`'
     81  HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi`'
    5682  ;;
    5783
    5884i[3456]86-*-sysv*)
    5985  HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; fi`'
    60   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; fi` /lib/crtn.o'
     86  HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; fi` /lib/crtn.o'
    6187  ;;
    6288
    6389i[3456]86-*-solaris*)
    6490  HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else ${CC} -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else ${CC} -print-file-name=crti.o; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
    65   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`'
    66   NATIVE_LIB_DIRS=/usr/ccs/lib
     91  HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`'
    6792  ;;
    6893
     
    79104  rm -f crtend.c
    80105  HOSTING_CRT0='/lib/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
    81   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /lib/crtn.o'
    82   ;;
    83 
    84 i[3456]86-*-linux*aout* | i[3456]86-*-linux*oldld)
    85   HOSTING_CRT0=/usr/lib/crt0.o
    86   ;;
    87 
    88 i[3456]86-*-linux*libc1*)
    89   HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
    90   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
    91   ;;
    92 
    93 i[3456]86-*-linux-gnu*)
    94   HOSTING_CRT0='-dynamic-linker `fgrep ld-linux.so \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[     ][      ]*\(.*/ld-linux.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
    95   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
     106  HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` /lib/crtn.o'
    96107  ;;
    97108
    98109i[3456]86-*-lynxos*)
    99110  HOSTING_CRT0=/lib/init1.o
    100   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc -lm /lib/initn.o'
     111  HOSTING_LIBS="$HOSTING_LIBS"' -lm /lib/initn.o'
    101112  ;;
    102113
    103114i[3456]86-pc-interix*)
    104115  HOSTING_CRT0='$$INTERIX_ROOT/usr/lib/crt0.o'
    105   NATIVE_LIB_DIRS='$$INTERIX_ROOT/usr/lib/'
    106   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L $$X/local_bin -L $$INTERIX_ROOT/usr/lib -lc -lcpsx -lc -lcpsx $$INTERIX_ROOT/usr/lib/psxdll.a $$INTERIX_ROOT/usr/lib/psxdll2.a'
     116  HOSTING_LIBS='-L $$X/local_bin -L $$INTERIX_ROOT/usr/lib '"$HOSTING_LIBS"' -lcpsx -lc -lcpsx $$INTERIX_ROOT/usr/lib/psxdll.a $$INTERIX_ROOT/usr/lib/psxdll2.a'
    107117  ;;
    108118
    109119i[3456]86-*-cygwin*)
    110   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
     120  HOSTING_LIBS="$HOSTING_LIBS"' -lcygwin -L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
    111121  ;;
    112122
    113123ia64-*-linux-gnu*)
    114   HOSTING_CRT0='-dynamic-linker `egrep "ld-linux-ia64.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[      ][      ]*\(.*/ld-linux-ia64.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
    115   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
     124  HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux-ia64,g"`
     125  ;;
     126
     127ia64-*-aix*)
     128  HOSTING_CRT0='-dynamic-linker `egrep "libc.so" \`${CC} --print-file-name=specs\` | sed -e "s,.*-dynamic-linker[       ][      ]*\(.*/libc.so..\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
     129  HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
    116130  ;;
    117131
     
    120134  ;;
    121135
    122 mips*-sgi-irix4*)
     136mips*-sgi-irix4* | mips*-sgi-irix5*)
    123137  HOSTING_CRT0=/usr/lib/crt1.o
    124   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o'
    125   ;;
    126 
    127 mips*-sgi-irix5*)
    128   HOSTING_CRT0=/usr/lib/crt1.o
    129   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc /usr/lib/crtn.o'
     138  HOSTING_LIBS="$HOSTING_LIBS"' /usr/lib/crtn.o'
    130139  ;;
    131140
    132141mips*-sgi-irix6*)
    133142  HOSTING_CRT0='/usr/lib32/crt1.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o ; else ${CC} -print-file-name=crtbegin.o; fi`'
    134   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L/usr/lib32 -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o ; else ${CC} -print-file-name=crtend.o; fi` /usr/lib32/crtn.o -init __do_global_ctors -fini __do_global_dtors'
     143  HOSTING_LIBS='-L/usr/lib32 '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o ; else ${CC} -print-file-name=crtend.o; fi` /usr/lib32/crtn.o -init __do_global_ctors -fini __do_global_dtors'
    135144  ;;
    136145
    137146mips*-*-linux-gnu*)
    138   HOSTING_CRT0='-dynamic-linker /lib/ld.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
    139   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
    140   ;;
    141 
    142 m68*-*-linux*aout*)
    143   HOSTING_CRT0=/usr/lib/crt0.o
    144   ;;
    145 
    146 m68*-*-linux*libc1*)
    147   HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; elif [ -f /usr/lib/crtbegin.o ]; then echo /usr/lib/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
    148   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; elif [ -f /usr/lib/crtend.o ]; then echo /usr/lib/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
     147  HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
    149148  ;;
    150149
    151150m68*-*-linux-gnu*)
    152   HOSTING_CRT0='-dynamic-linker /lib/ld.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
    153   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
     151  HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
    154152  ;;
    155153
    156154m68*-*-lynxos*)
    157155  HOSTING_CRT0=/lib/init1.o
    158   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc -lm /lib/initn.o'
     156  HOSTING_LIBS="$HOSTING_LIBS"' -lm /lib/initn.o'
    159157  ;;
    160158
    161159m68*-motorola-sysv)
    162160  HOSTING_CRT0='`if [ -f ../gcc/crt0.o ]; then echo ../gcc/crt0.o; elif [ -f \`${CC} -print-file-name=\`crt0.o ]; then echo \`${CC} -print-file-name=\`crt0.o; else echo /lib/crt0.o; fi`'
    163   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc881 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
     161  HOSTING_LIBS=`echo "$HOSTING_LIBS" | sed -e "s,-lc,-lc881,"`
    164162  ;;
    165163
     
    176174m88*-motorola-sysv3)
    177175  HOSTING_CRT0='/lib/crt0.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
    178   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
     176  HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi`'
     177  ;;
     178
     179powerpc64*-*-linux-gnu*)
     180  HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld64.so.1,"`
    179181  ;;
    180182
    181183powerpc*-*-linux-gnu*)
    182   HOSTING_CRT0='-dynamic-linker /lib/ld.so.1 /usr/lib/crt1.o /usr/lib/crti.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
    183   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` /usr/lib/crtn.o'
     184  HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
     185  ;;
     186
     187s390x-*-linux-gnu*)
     188  HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld64.so.1,"`
     189  ;;
     190
     191s390-*-linux-gnu*)
     192  HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld.so.1,"`
    184193  ;;
    185194
    186195sparc*-*-solaris2*)
    187196  HOSTING_CRT0='`if [ -f ../gcc/crt1.o ]; then echo ../gcc/crt1.o; else ${CC} -print-file-name=crt1.o; fi` `if [ -f ../gcc/crti.o ]; then echo ../gcc/crti.o; else ${CC} -print-file-name=crti.o; fi` /usr/ccs/lib/values-Xa.o `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} -print-file-name=crtbegin.o; fi`'
    188   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`'
    189   NATIVE_LIB_DIRS=/usr/ccs/lib
     197  HOSTING_LIBS="$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} -print-file-name=crtend.o; fi` `if [ -f ../gcc/crtn.o ]; then echo ../gcc/crtn.o; else ${CC} -print-file-name=crtn.o; fi`'
    190198  ;;
    191199
    192200sparc-*-linux-gnu*)
    193   HOSTING_CRT0='-dynamic-linker /lib/ld-linux.so.2 `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
    194   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
     201  HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib/ld-linux.so.2,"`
    195202  ;;
    196203
    197204sparc64-*-linux-gnu*)
    198   HOSTING_CRT0='-dynamic-linker /lib64/ld-linux.so.2 `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
    199   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
    200   ;;
    201 
    202 #
    203 #       Generic configurations:
    204 #
     205  HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld-linux.so.2,"`
     206  ;;
     207
     208x86_64-*-linux-gnu*)
     209  HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,\\\`egrep.*\"\\\`,/lib64/ld-linux-x86-64.so.2,"`
     210  ;;
    205211
    206212*-*-freebsd*)
    207   NATIVE_LIB_DIRS=/usr/lib
    208   # Older versions of gcc do not use a specs file.  In those cases,
    209   # gcc -print-file-name=specs will simply print specs.  We create a
    210   # dummy specs files to handle this.
    211   echo "-dynamic-linker `${CC} --print-file-name=ld-elf.so.1`" > specs
    212   HOSTING_CRT0='-dynamic-linker `${CC} --print-file-name=ld-elf.so.1` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `${CC} --print-file-name=crtbegin.o`'
    213   HOSTING_LIBS='`${CC} -print-libgcc-file-name` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `${CC} -print-libgcc-file-name` `${CC} --print-file-name=crtend.o` `${CC} --print-file-name=crtn.o`'
     213  ;;
     214
     215*-*-linux*)
     216  ;;
     217
     218*-*-netbsd*)
     219  # NetBSD typically does not use the GCC crtstuff, so ignore it.
     220  HOSTING_CRT0='-dynamic-linker /usr/libexec/ld.elf_so /usr/lib/crt0.o /usr/lib/crtbegin.o'
     221  HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` /usr/lib/crtend.o'
    214222  ;;
    215223
    216224alpha*-*-*)
    217225  HOSTING_CRT0=/usr/ccs/lib/crt0.o
    218   NATIVE_LIB_DIRS=/usr/ccs/lib
    219   ;;
    220 
    221 romp-*-*)
    222   HDEFINES=-DNO_VARARGS
    223226  ;;
    224227
  • trunk/src/binutils/ld/configure.tgt

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r617 r618  
    1010#  targ_extra_libpath   additional linker emulations using LIB_PATH
    1111#  targ_extra_ofiles    additional objects needed by the emulation
     12#  NATIVE_LIB_DIRS      library directories to search on this host
     13#                       (if we are a native or sysrooted linker)
    1214
    1315targ_extra_emuls=
     
    2325arc-*-elf*)             targ_emul=arcelf ;;
    2426avr-*-*)                targ_emul=avr85xx
    25                         targ_extra_emuls="avr1200 avr23xx avr44x4 avr4433 avrmega603 avrmega103 avrmega161" ;;
     27                        targ_extra_emuls="avr1200 avr23xx avr44x4 avr4433 avrmega603 avrmega103 avrmega161 avr1 avr2 avr3 avr4 avr5" ;;
    2628cris-*-*aout*)          targ_emul=crisaout
    2729                        targ_extra_emuls="criself crislinux"
     
    3436d30v-*-*onchip*)        targ_emul=d30v_o; targ_extra_emuls="d30velf d30v_e" ;;
    3537d30v-*-*)               targ_emul=d30velf; targ_extra_emuls="d30v_e d30v_o" ;;
     38dlx-*-elf*)             targ_emul=elf32_dlx ;;
    3639sparc64-*-aout*)        targ_emul=sparcaout ;;
    3740sparc64-*-elf*)         targ_emul=elf64_sparc ;;
     
    4548sparc*-*-sysv4*)        targ_emul=elf32_sparc ;;
    4649sparc64-*-freebsd* | sparcv9-*-freebsd*)
    47                         targ_emul=elf64_sparc
    48                         targ_extra_emuls="elf32_sparc"
     50                        targ_emul=elf64_sparc_fbsd
     51                        targ_extra_emuls="elf64_sparc elf32_sparc"
    4952                        targ_extra_libpath=$targ_extra_emuls
    5053                        tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
     
    5760sparc64-*-linux-gnu*)   targ_emul=elf64_sparc
    5861                        targ_extra_emuls="elf32_sparc sparclinux sun4"
     62                        targ_extra_libpath=elf32_sparc
    5963                        tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
    6064                        tdir_sparclinux=${tdir_elf32_sparc}aout
     
    6367sparc*-*-linux-gnu*)    targ_emul=elf32_sparc
    6468                        targ_extra_emuls="sparclinux elf64_sparc sun4"
     69                        targ_extra_libpath=elf64_sparc
    6570                        tdir_sparclinux=${targ_alias}aout
    6671                        tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
     
    6873                        ;;
    6974sparc*-*-lynxos*)       targ_emul=sparclynx ;;
    70 sparc64-*-netbsd*)      targ_emul=elf64_sparc ;;
     75sparc64-*-netbsd* | sparc64-*-openbsd*)
     76                        targ_emul=elf64_sparc
     77                        targ_extra_emuls="elf32_sparc"
     78                        ;;
    7179sparc*-*-netbsd*elf*)   targ_emul=elf32_sparc ;;
    7280sparc*-*-netbsd*)       targ_emul=sparcnbsd ;;
     
    99107i960-*-elf*)            targ_emul=elf32_i960 ;;
    100108ia64-*-elf*)            targ_emul=elf64_ia64 ;;
    101 ia64-*-freebsd*)        targ_emul=elf64_ia64 ;;
     109ia64-*-freebsd*)        targ_emul=elf64_ia64_fbsd
     110                        targ_extra_emuls="elf64_ia64" ;;
     111ia64-*-netbsd*)         targ_emul=elf64_ia64 ;;
    102112ia64-*-linux*)          targ_emul=elf64_ia64 ;;
     113ia64-*-aix*)            targ_emul=elf64_aix ;;
    103114m32r-*-*)               targ_emul=m32relf ;;
    104115m68hc11-*-*|m6811-*-*)  targ_emul=m68hc11elf
     
    112123*-tandem-none)          targ_emul=st2000 ;;
    113124i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;;
    114 i370-*-mvs*)            targ_emul=mvs ;;
     125i[3456]86-*-nto-qnx*)   targ_emul=i386nto ;;
    115126i[3456]86-*-vsta)       targ_emul=vsta ;;
    116127i[3456]86-go32-rtems*)  targ_emul=i386go32 ;;
     
    122133i[3456]86-*-lynxos*)    targ_emul=i386lynx ;;
    123134i[3456]86-*-coff)       targ_emul=i386coff ;;
     135i[3456]86-*-rtemscoff*) targ_emul=i386coff ;;
    124136i[3456]86-*-rtemself*)  targ_emul=elf_i386 ;;
    125 i[3456]86-*-rtems*)     targ_emul=i386coff ;;
     137i[3456]86-*-rtems*)     targ_emul=elf_i386 ;;
     138i[3456]86-*-aros*)      targ_emul=elf_i386 ;;
    126139i[3456]86-*-bsd)        targ_emul=i386bsd ;;
    127140i[3456]86-*-bsd386)     targ_emul=i386bsd ;;
     
    135148i[3456]86-*-linux-gnu*) targ_emul=elf_i386
    136149                        targ_extra_emuls=i386linux
     150                        if test x${want64} = xtrue; then
     151                          targ_extra_emuls="$targ_extra_emuls elf_x86_64"
     152                        fi
    137153                        tdir_i386linux=${targ_alias}aout
    138154                        ;;
    139155x86_64-*-linux-gnu*)    targ_emul=elf_x86_64
    140156                        targ_extra_emuls="elf_i386 i386linux"
    141                         tdir_i386linux=${targ_alias}aout
     157                        targ_extra_libpath=elf_i386
     158                        tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
     159                        tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
    142160                        ;;
    143161i[3456]86-*-sysv[45]*)  targ_emul=elf_i386 ;;
    144 i[3456]86-*-solaris2*)  targ_emul=elf_i386 ;;
     162i[3456]86-*-solaris2*)  targ_emul=elf_i386_ldso
     163                        targ_extra_emuls="elf_i386"
     164                        ;;
    145165i[3456]86-*-unixware)   targ_emul=elf_i386 ;;
    146 i[3456]86-*-solaris*)   targ_emul=elf_i386 ;;
    147 i[3456]86-*-netbsd*)    targ_emul=i386nbsd ;;
     166i[3456]86-*-solaris*)   targ_emul=elf_i386_ldso
     167                        targ_extra_emuls="elf_i386"
     168                        ;;
     169i[3456]86-*-netbsdelf*) targ_emul=elf_i386
     170                        targ_extra_emuls=i386nbsd
     171                        ;;
     172i[3456]86-*-netbsdpe*)  targ_emul=i386pe
     173                        targ_extra_ofiles="deffilep.o pe-dll.o"
     174                        ;;
     175i[3456]86-*-netbsd*)    targ_emul=i386nbsd
     176                        targ_extra_emuls=elf_i386
     177                        ;;
     178x86_64-*-netbsd*)       targ_emul=elf_x86_64
     179                        targ_extra_emuls="elf_i386 i386nbsd"
     180                        tdir_elf_i386=`echo ${targ_alias} | \
     181                            sed -e 's/x86_64/i386/'`
     182                        case "${tdir_elf_i386}" in
     183                        *-netbsdelf*) ;;
     184                        *)
     185                                tdir_elf_i386=`echo ${tdir_elf_i386} | \
     186                                    sed -e 's/netbsd/netbsdelf/'`
     187                                ;;
     188                        esac
     189                        ;;
    148190i[3456]86-*-netware)    targ_emul=i386nw ;;
    149191i[3456]86-*-elf*)       targ_emul=elf_i386 ;;
     192i[3456]86-*-kaos*)      targ_emul=elf_i386 ;;
    150193i[3456]86-*-freebsdaout* | i[3456]86-*-freebsd[12].* | i[3456]86-*-freebsd[12])
    151194                        targ_emul=i386bsd ;;
    152 i[3456]86-*-freebsd*)   targ_emul=elf_i386 ;;
    153 x86_64-*-freebsd*)      targ_emul=elf_x86_64
    154                         targ_extra_emuls=elf_i386
    155                         tdir_elf_i386=`echo ${targ_alias} | sed -e 's/x86_64/i386/'`
     195i[3456]86-*-freebsd*)   targ_emul=elf_i386_fbsd
     196                        targ_extra_emuls="elf_i386 i386bsd" ;;
     197x86_64-*-freebsd*)      targ_emul=elf_x86_64_fbsd
     198                        targ_extra_emuls="elf_i386_fbsd elf_x86_64 elf_i386"
     199                        tdir_elf_i386=`echo ${targ_alias} \
     200                            | sed -e 's/x86_64/i386/'`
    156201                        ;;
    157202i[3456]86-*-sysv*)      targ_emul=i386coff ;;
     
    166211                        targ_extra_ofiles="deffilep.o pe-dll.o" ;;
    167212i[3456]86-*-cygwin*)    targ_emul=i386pe ;
    168                         targ_extra_ofiles="deffilep.o pe-dll.o" ;;
     213                        targ_extra_ofiles="deffilep.o pe-dll.o"
     214                        test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api' ;;
    169215i[3456]86-*-mingw32*)   targ_emul=i386pe ;
    170216                        targ_extra_ofiles="deffilep.o pe-dll.o" ;;
     
    185231arm-*-coff)             targ_emul=armcoff ;;
    186232arm-*-vxworks)          targ_emul=armcoff ;;
    187 arm-*-freebsd*)         targ_emul=armelf ;;
    188 arm-*-netbsd*)          targ_emul=armnbsd ;;
     233arm-*-freebsd*)         targ_emul=armelf_fbsd
     234                        targ_extra_emuls="armelf" ;;
     235armeb-*-netbsdelf*)     targ_emul=armelfb_nbsd;
     236                        targ_extra_emuls="armelf_nbsd armelf armnbsd" ;;
     237arm-*-netbsdelf*)       targ_emul=armelf_nbsd;
     238                        targ_extra_emuls="armelfb_nbsd armelf armnbsd" ;;
     239arm-*-netbsd*)          targ_emul=armnbsd;
     240                        targ_extra_emuls="armelf armelf_nbsd armelfb_nbsd"  ;;
     241arm-*-nto*)             targ_emul=armnto ;;
     242arm-*-openbsd*)         targ_emul=armnbsd ;;
    189243arm-*-rtems*)           targ_emul=armelf ;;
    190244arm-*-elf)              targ_emul=armelf ;;
     245arm-*-kaos*)            targ_emul=armelf ;;
     246arm9e-*-elf)            targ_emul=armelf ;;
    191247arm-*-oabi)             targ_emul=armelf_oabi ;;
    192248arm*-*-linux-gnu*)      targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
     
    196252strongarm-*-coff)       targ_emul=armcoff ;;
    197253strongarm-*-elf)        targ_emul=armelf ;;
     254strongarm-*-kaos*)      targ_emul=armelf ;;
    198255thumb-*-coff)           targ_emul=armcoff ;;
    199256thumb-*-elf)            targ_emul=armelf ;;
     
    206263xscale-*-elf)           targ_emul=armelf ;;
    207264h8300-*-hms* | h8300-*-coff* | h8300-*-rtems*)
    208                         targ_emul=h8300; targ_extra_emuls="h8300h h8300s"
    209                         ;;
    210 h8500-*-hms* | h8500-*-coff*)
     265                        targ_emul=h8300; targ_extra_emuls="h8300h h8300s h8300hn h8300sn"
     266                        ;;
     267h8300-*-elf*)
     268                        targ_emul=h8300elf;
     269                        targ_extra_emuls="h8300helf h8300self h8300hnelf h8300snelf"
     270                        ;;
     271h8500-*-hms* | h8500-*-coff* | h8500-*-rtems*)
    211272                        targ_emul=h8500
    212273                        targ_extra_emuls="h8500s h8500b h8500m h8500c"
    213274                        ;;
    214275sh-*-linux*)
     276                        targ_emul=shlelf_linux
     277                        targ_extra_emuls=shelf_linux
     278                        targ_extra_libpath=shelf_linux
     279                        ;;
     280sh64eb-*-linux*)        targ_emul=shelf32_linux
     281                        targ_extra_emuls="shlelf32_linux"
     282                        ;;
     283sh64-*-linux*)          targ_emul=shlelf32_linux
     284                        targ_extra_emuls="shelf32_linux"
     285                        targ_extra_libpath=shelf32_linux
     286                        ;;
     287sh*eb-*-linux*)
    215288                        targ_emul=shelf_linux
    216                         targ_extra_emuls=shlelf_linux
    217                         ;;
    218 sh-*-elf* | sh-*-rtemself*)
     289                        ;;
     290sh*-*-linux*)
     291                        targ_emul=shlelf_linux
     292                        ;;
     293sh5le-*-netbsd*)
     294                        targ_emul=shlelf32_nbsd
     295                        targ_extra_emuls="shelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd"
     296                        ;;
     297sh5-*-netbsd*)
     298                        targ_emul=shelf32_nbsd
     299                        targ_extra_emuls="shlelf32_nbsd shelf64_nbsd shlelf64_nbsd shelf_nbsd shlelf_nbsd"
     300                        ;;
     301sh64le-*-netbsd*)
     302                        targ_emul=shlelf64_nbsd
     303                        targ_extra_emuls="shelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd"
     304                        ;;
     305sh64-*-netbsd*)
     306                        targ_emul=shelf64_nbsd
     307                        targ_extra_emuls="shlelf64_nbsd shelf32_nbsd shlelf32_nbsd shelf_nbsd shlelf_nbsd"
     308                        ;;
     309sh*le-*-netbsdelf*)
     310                        targ_emul=shlelf_nbsd
     311                        targ_extra_emuls=shelf_nbsd
     312                        ;;
     313sh*-*-netbsdelf*)
     314                        targ_emul=shelf_nbsd
     315                        targ_extra_emuls=shlelf_nbsd
     316                        ;;
     317shle*-*-elf* | sh[1234]*le*-*-elf | shle*-*-kaos*)
     318                        targ_emul=shlelf
     319                        targ_extra_emuls="shelf shl sh"
     320                        ;;
     321sh-*-elf* | sh[1234]*-*-elf | sh-*-rtemself* | sh-*-kaos*)
    219322                        targ_emul=shelf
    220323                        targ_extra_emuls="shlelf sh shl"
    221324                        ;;
     325sh-*-nto*)              targ_emul=shelf_nto
     326                        targ_extra_emuls=shlelf_nto
     327                        ;;
    222328sh-*-pe)                targ_emul=shpe ;
    223329                        targ_extra_ofiles="deffilep.o pe-dll.o" ;;
    224330sh-*-*|sh-*-rtems*)     targ_emul=sh; targ_extra_emuls=shl ;;
     331sh64le-*-elf*)
     332                        targ_emul=shlelf
     333                        targ_extra_emuls="shelf shlelf32 shelf32 shlelf64 shelf64"
     334                        targ_extra_libpath=$targ_extra_emuls
     335                        ;;
     336sh64-*-elf*)
     337                        targ_emul=shelf
     338                        targ_extra_emuls="shlelf shelf32 shlelf32 shelf64 shlelf64"
     339                        targ_extra_libpath=$targ_extra_emuls
     340                        ;;
    225341m68k-sony-*)            targ_emul=news ;;
    226342m68k-hp-bsd*)           targ_emul=hp300bsd ;;
     
    240356m68*-*-gnu*)            targ_emul=m68kelf ;;
    241357m68*-*-lynxos*)         targ_emul=m68klynx ;;
    242 m68*-hp*-netbsd*)       targ_emul=m68k4knbsd ;;
    243 m68*-*-netbsd*)         targ_emul=m68knbsd ;;
     358m68*-*-netbsd*4k*)      targ_emul=m68k4knbsd
     359                        targ_extra_emuls="m68knbsd m68kelfnbsd" ;;
     360m68*-*-netbsdelf*)      targ_emul=m68kelfnbsd
     361                        targ_extra_emuls="m68knbsd m68k4knbsd" ;;
     362m68*-*-netbsdaout* | m68*-*-netbsd*)
     363                        targ_emul=m68knbsd
     364                        targ_extra_emuls="m68kelfnbsd m68k4knbsd" ;;
    244365m68*-*-psos*)           targ_emul=m68kpsos ;;
    245 m68*-*-rtems*)          targ_emul=m68kcoff ;;
     366m68*-*-rtemscoff*)      targ_emul=m68kcoff ;;
     367m68*-*-rtems*)          targ_emul=m68kelf ;;
     368hppa*64*-*-linux-gnu*)  targ_emul=hppa64linux ;;
    246369hppa*64*-*)             targ_emul=elf64hppa ;;
    247370hppa*-*-linux-gnu*)     targ_emul=hppalinux ;;
    248371hppa*-*-*elf*)          targ_emul=hppaelf ;;
    249372hppa*-*-lites*)         targ_emul=hppaelf ;;
     373hppa*-*-netbsd*)        targ_emul=hppanbsd ;;
     374hppa*-*-openbsd*)       targ_emul=hppaobsd ;;
    250375hppa*-*-rtems*)         targ_emul=hppaelf ;;
    251376vax-dec-ultrix* | vax-dec-bsd*) targ_emul=vax ;;
     377vax-*-netbsdelf*)       targ_emul=elf32vax
     378                        targ_extra_emuls=vaxnbsd ;;
     379vax-*-netbsdaout* | vax-*-netbsd*)
     380                        targ_emul=vaxnbsd
     381                        targ_extra_emuls=elf32vax ;;
    252382mips*-*-pe)             targ_emul=mipspe ;
    253383                        targ_extra_ofiles="deffilep.o pe-dll.o" ;;
     
    257387mips*-sgi-irix6*)       targ_emul=elf32bmipn32
    258388                        targ_extra_emuls="elf32bsmip elf64bmip"
     389                        targ_extra_libpath=$targ_extra_emuls
    259390                        ;;
    260391mips*-sgi-irix*)        targ_emul=mipsbig ;;
     
    262393mips*-*-ecoff*)         targ_emul=mipsidt ;;
    263394mips*-dec-bsd*)         targ_emul=mipsbsd ;;
    264 mips*-dec-netbsd*)      targ_emul=elf32lmip ;;
     395mips*el-*-netbsd*)      targ_emul=elf32lmip
     396                        targ_extra_emuls="elf32bmip"
     397                        ;;
     398mips*-*-netbsd*)        targ_emul=elf32bmip
     399                        targ_extra_emuls="elf32lmip"
     400                        ;;
    265401mips*-*-bsd*)           targ_emul=mipsbig ;;
    266402mips*vr4300el-*-elf*)   targ_emul=elf32l4300 ;;
     
    276412mips*el-*-vxworks*)     targ_emul=elf32elmip ;;
    277413mips*-*-vxworks*)       targ_emul=elf32ebmip ;;
     414mips64*el-*-linux-gnu*) targ_emul=elf32ltsmipn32
     415                        targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
     416                        ;;
     417mips64*-*-linux-gnu*)   targ_emul=elf32btsmipn32
     418                        targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
     419                        ;;
    278420mips*el-*-linux-gnu*)   targ_emul=elf32ltsmip
    279                         targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
     421                        targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
    280422                        ;;
    281423mips*-*-linux-gnu*)     targ_emul=elf32btsmip
    282                         targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
     424                        targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
    283425                        ;;
    284426mips*-*-lnews*)         targ_emul=mipslnews ;;
    285427mips*-*-sysv4*)         targ_emul=elf32btsmip ;;
     428mmix-*-*)               targ_emul=mmo
     429                        targ_extra_emuls=elf64mmix
     430                        ;;
    286431mn10200-*-*)            targ_emul=mn10200 ;;
    287432mn10300-*-*)            targ_emul=mn10300 ;;
    288 alpha*-*-freebsd*)      targ_emul=elf64alpha
    289                         targ_extra_emuls=alpha
     433msp430-*-*)             targ_emul=msp430x149
     434                        targ_extra_emuls="msp430x148 msp430x147 msp430x133 msp430x135 msp430x110 msp430x112 msp430x122 msp430x123 msp430x412 msp430x413 msp430x311 msp430x312 msp430x313 msp430x314 msp430x315 msp430x323 msp430x325 msp430x336 msp430x337 msp430x1101 msp430x1111 msp430x1121 msp430x1331 msp430x1351 msp430x435 msp430x436 msp430x437 msp430x447 msp430x448 msp430x449 msp430x1222 msp430x1232 msp430x169 msp430x168 msp430x167 msp430x155  msp430x156 msp430x157 msp430x1122 msp430x1132" ;;
     435alpha*-*-freebsd*)      targ_emul=elf64alpha_fbsd
     436                        targ_extra_emuls="elf64alpha alpha"
    290437                        tdir_alpha=`echo ${targ_alias} | sed -e 's/freebsd/freebsdecoff/'`
    291438                        ;;
     
    299446alpha*-*-gnu*)          targ_emul=elf64alpha ;;
    300447alpha*-*-netware*)      targ_emul=alpha ;;
    301 alpha*-*-netbsd*)       targ_emul=elf64alpha ;;
     448alpha*-*-netbsd*)       targ_emul=elf64alpha_nbsd ;;
     449alpha*-*-openbsd*)      targ_emul=elf64alpha ;;
    302450z8k-*-coff)             targ_emul=z8002; targ_extra_emuls=z8001 ;;
    303451ns32k-pc532-mach* | ns32k-pc532-ux*)    targ_emul=pc532macha ;;
    304 ns32k-pc532-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd ;;
    305 powerpc-*-freebsd*)     targ_emul=elf32ppc;
    306                         targ_extra_emuls=elf32ppcsim;
     452ns32k-*-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd ;;
     453openrisc-*-*)           targ_emul=elf32openrisc ;;
     454or32-*-coff)            targ_emul=or32 ;;
     455or32-*-elf)             targ_emul=or32elf ;;
     456or32-*-rtems)           targ_emul=or32 ;;
     457pdp11-*-*)              targ_emul=pdp11 ;;
     458pjl*-*-*)               targ_emul=pjlelf ; targ_extra_emuls="elf_i386" ;;
     459pj*-*-*)                targ_emul=pjelf ;;
     460powerpc-*-freebsd*)     targ_emul=elf32ppc_fbsd;
     461                        targ_extra_emuls="elf32ppc elf32ppcsim";
    307462                        targ_extra_libpath=elf32ppc;
    308463                        tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'`
    309464                        ;;
    310 powerpc-*-linux-gnu*)   targ_emul=elf32ppclinux;
    311                         targ_extra_emuls="elf32ppc elf32ppcsim";
    312                         targ_extra_libpath=elf32ppc ;;
    313 pjl*-*-*)               targ_emul=pjlelf ; targ_extra_emuls="elf_i386" ;;
    314 pj*-*-*)                targ_emul=pjelf ;;
    315 powerpc-*-elf* | powerpc-*-eabi* | powerpc-*-sysv* \
    316   | powerpc-*-netbsd* | powerpc-*-vxworks*)
    317         targ_emul=elf32ppc targ_extra_emuls="elf32ppclinux elf32ppcsim";;
    318 powerpcle-*-elf* | powerpcle-*-eabi* | powerpcle-*-solaris* \
    319   | powerpcle-*-sysv* | powerpcle-*-vxworks*)
    320         targ_emul=elf32lppc targ_extra_emuls="elf32ppcsim";;
     465powerpc*-*-linux*)
     466        case "${targ}" in
     467        *64*)   targ_emul=elf64ppc
     468                targ_extra_emuls="elf32ppclinux elf32ppc elf32ppcsim"
     469                targ_extra_libpath="elf32ppclinux elf32ppc"
     470                tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
     471                tdir_elf32ppclinux=$tdir_elf32ppc
     472                tdir_elf32ppcsim=$tdir_elf32ppc ;;
     473        *)      targ_emul=elf32ppclinux
     474                targ_extra_emuls="elf32ppc elf32ppcsim"
     475                targ_extra_libpath=elf32ppc
     476                if test "${want64}" = "true"; then
     477                  targ_extra_emuls="$targ_extra_emuls elf64ppc"
     478                  targ_extra_libpath="$targ_extra_libpath elf64ppc"
     479                fi
     480                ;;
     481        esac ;;
     482powerpc*le-*-elf* | powerpc*le-*-eabi* | powerpc*le-*-solaris* \
     483  | powerpc*le-*-sysv* | powerpc*le-*-vxworks*)
     484        case "${targ}" in
     485        *64*)   targ_emul=elf64lppc
     486                targ_extra_emuls="elf32lppc elf32lppcsim"
     487                tdir_elf32lppc=`echo "${targ_alias}" | sed -e 's/64//'`
     488                tdir_elf32lppcsim=$tdir_elf32lppc ;;
     489        *)      targ_emul=elf32lppc
     490                targ_extra_emuls="elf32ppcsim" ;;
     491        esac ;;
     492powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \
     493  | powerpc*-*-netbsd* | powerpc-*-openbsd* | powerpc*-*-vxworks* | powerpc*-*-kaos*)
     494        case "${targ}" in
     495        *64*)   targ_emul=elf64ppc
     496                targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
     497                tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
     498                tdir_elf32ppclinux=$tdir_elf32ppc
     499                tdir_elf32ppcsim=$tdir_elf32ppc ;;
     500        *)      targ_emul=elf32ppc
     501                targ_extra_emuls="elf32ppclinux elf32ppcsim" ;;
     502        esac ;;
     503powerpc-*-nto*)         targ_emul=elf32ppcnto ;;
     504powerpcle-*-nto*)       targ_emul=elf32lppcnto ;;
    321505powerpcle-*-rtems*)     targ_emul=elf32leppc ;;
    322506powerpc-*-rtems*)       targ_emul=elf32ppc ;;
     
    326510powerpcle-*-winnt*)     targ_emul=ppcpe ;;
    327511powerpcle-*-cygwin*)    targ_emul=ppcpe ;;
     512powerpc-*-aix5*)        targ_emul=aix5ppc ;;
    328513powerpc-*-aix*)         targ_emul=aixppc ;;
    329514powerpc-*-beos*)        targ_emul=aixppc ;;
     515powerpc-*-windiss*)     targ_emul=elf32ppcwindiss ;;
     516rs6000-*-aix5*)         targ_emul=aix5rs6 ;;
    330517rs6000-*-aix*)          targ_emul=aixrs6 ;;
    331518tic30-*-*aout*)         targ_emul=tic30aout ;;
    332519tic30-*-*coff*)         targ_emul=tic30coff ;;
     520tic4x-*-* | c4x-*-*)    targ_emul=tic4xcoff ; targ_extra_emuls="tic3xcoff tic3xcoff_onchip" ;;
    333521tic54x-*-* | c54x*-*-*) targ_emul=tic54xcoff ;;
    334522tic80-*-*)              targ_emul=tic80coff ;;
     
    336524v850e-*-*)              targ_emul=v850 ;;
    337525v850ea-*-*)             targ_emul=v850 ;;
     526iq2000-*-elf)           targ_emul=elf32iq2000 ; targ_extra_emuls="elf32iq10" ;;
     527frv-*-*)                targ_emul=elf32frv ;;
    338528w65-*-*)                targ_emul=w65 ;;
     529xstormy16-*-*)          targ_emul=elf32xstormy16 ;;
     530xtensa-*-*)             targ_emul=elf32xtensa;;
    339531fr30-*-*)               targ_emul=elf32fr30 ;;
    340532mcore-*-pe)             targ_emul=mcorepe ;
    341533                        targ_extra_ofiles="deffilep.o pe-dll.o" ;;
    342534mcore-*-elf)            targ_emul=elf32mcore ;;
     535s390x-*-linux*)         targ_emul=elf64_s390
     536                        targ_extra_emuls=elf_s390
     537                        targ_extra_libpath=$targ_extra_emuls
     538                        tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
     539s390-*-linux*)          targ_emul=elf_s390
     540                        if test "${want64}" = "true"; then
     541                          targ_extra_emuls=elf64_s390
     542                          targ_extra_libpath=$targ_extra_emuls
     543                          tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'`
     544                        fi ;;
    343545*-*-ieee*)              targ_emul=vanilla ;;
     546ip2k-*-elf)             targ_emul=elf32ip2k ;;
    344547
    345548*)
     
    349552
    350553esac
     554
     555NATIVE_LIB_DIRS='/usr/local/lib /lib /usr/lib'
     556case "${target}" in
     557
     558*-*-freebsd*)
     559  NATIVE_LIB_DIRS='/lib /usr/lib /usr/local/lib'
     560  ;;
     561
     562hppa*64*-*-hpux11*)
     563  NATIVE_LIB_DIRS=/usr/lib/pa20_64
     564  ;;
     565
     566i[3456]86-*-sysv4*)
     567  NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
     568  ;;
     569
     570i[3456]86-*-solaris*)
     571  NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
     572  ;;
     573
     574i[3456]86-pc-interix*)
     575  NATIVE_LIB_DIRS='/usr/local/lib $$INTERIX_ROOT/usr/lib /lib /usr/lib'
     576  ;;
     577
     578ia64-*-aix*)
     579  NATIVE_LIB_DIRS='/usr/local/lib /usr/lib/ia64l64 /lib /usr/lib'
     580  ;;
     581
     582sparc*-*-solaris2*)
     583  NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
     584  ;;
     585
     586i[03-9x]86-*-cygwin*)
     587  NATIVE_LIB_DIRS='/usr/lib /usr/lib/w32api'
     588  ;;
     589
     590*-*-linux*)
     591  ;;
     592
     593*-*-freebsd*)
     594  ;;
     595
     596*-*-netbsd*)
     597  ;;
     598
     599alpha*-*-*)
     600  NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
     601  ;;
     602
     603esac
  • trunk/src/binutils/ld/emultempl/i386aoutemx.em

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r617 r618  
    528528  NULL, /* recognized_file */
    529529  NULL, /* find_potential_libraries */
     530  NULL  /* new_vers_pattern.  */
    530531  gld_${EMULATION_NAME}_finish_link
    531532};
  • trunk/src/binutils/ld/ldctor.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r617 r618  
    11/* ldctor.c -- constructor support routines
    2    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
    3    Free Software Foundation, Inc.
     2   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
     3   2002 Free Software Foundation, Inc.
    44   By Steve Chamberlain <sac@cygnus.com>
    55
     
    2424#include "sysdep.h"
    2525#include "bfdlink.h"
    26 
    27 #include <ctype.h>
     26#include "safe-ctype.h"
    2827
    2928#include "ld.h"
     
    3130#include "ldlang.h"
    3231#include "ldmisc.h"
    33 #include "ldgram.h"
     32#include <ldgram.h>
    3433#include "ldmain.h"
    3534#include "ldctor.h"
     
    4544   global for the entire link; we assume that there is only a single
    4645   CONSTRUCTORS command in the linker script.  */
    47 boolean constructors_sorted;
     46bfd_boolean constructors_sorted;
    4847
    4948/* The sets we have seen.  */
     
    147146  if (name[1] != 'I' && name[1] != 'D')
    148147    return -1;
    149   if (! isdigit ((unsigned char) name[3]))
     148  if (! ISDIGIT (name[3]))
    150149    return -1;
    151150
     
    206205ldctor_build_sets ()
    207206{
    208   static boolean called;
     207  static bfd_boolean called;
    209208  lang_statement_list_type *old;
    210   boolean header_printed;
     209  bfd_boolean header_printed;
    211210  struct set_info *p;
    212211
     
    215214  if (called)
    216215    return;
    217   called = true;
     216  called = TRUE;
    218217
    219218  if (constructors_sorted)
     
    258257  lang_list_init (stat_ptr);
    259258
    260   header_printed = false;
     259  header_printed = FALSE;
    261260  for (p = sets; p != (struct set_info *) NULL; p = p->next)
    262261    {
     
    344343                {
    345344                  minfo (_("\nSet                 Symbol\n\n"));
    346                   header_printed = true;
     345                  header_printed = TRUE;
    347346                }
    348347
  • trunk/src/binutils/ld/ldemul.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r617 r618  
    11/* ldemul.c -- clearing house for ld emulation states
    2    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000
     2   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002, 2003
    33   Free Software Foundation, Inc.
    44
     
    2222#include "bfd.h"
    2323#include "sysdep.h"
     24#include "getopt.h"
    2425
    2526#include "ld.h"
     
    113114}
    114115
    115 boolean
     116bfd_boolean
    116117ldemul_open_dynamic_archive (arch, search, entry)
    117118     const char *arch;
     
    121122  if (ld_emulation->open_dynamic_archive)
    122123    return (*ld_emulation->open_dynamic_archive) (arch, search, entry);
    123   return false;
    124 }
    125 
    126 boolean
     124  return FALSE;
     125}
     126
     127bfd_boolean
    127128ldemul_place_orphan (file, s)
    128129     lang_input_statement_type *file;
     
    131132  if (ld_emulation->place_orphan)
    132133    return (*ld_emulation->place_orphan) (file, s);
    133   return false;
    134 }
    135 
    136 int
     134  return FALSE;
     135}
     136
     137void
     138ldemul_add_options (ns, shortopts, nl, longopts, nrl, really_longopts)
     139     int ns;
     140     char **shortopts;
     141     int nl;
     142     struct option **longopts;
     143     int nrl;
     144     struct option **really_longopts;
     145{
     146  if (ld_emulation->add_options)
     147    (*ld_emulation->add_options) (ns, shortopts, nl, longopts,
     148                                  nrl, really_longopts);
     149}
     150
     151bfd_boolean
     152ldemul_handle_option (optc)
     153     int optc;
     154{
     155  if (ld_emulation->handle_option)
     156    return (*ld_emulation->handle_option) (optc);
     157  return FALSE;
     158}
     159
     160bfd_boolean
    137161ldemul_parse_args (argc, argv)
    138162     int argc;
     
    141165  /* Try and use the emulation parser if there is one.  */
    142166  if (ld_emulation->parse_args)
    143     {
    144       return ld_emulation->parse_args (argc, argv);
    145     }
    146   return 0;
     167    return (*ld_emulation->parse_args) (argc, argv);
     168  return FALSE;
    147169}
    148170
    149171/* Let the emulation code handle an unrecognized file.  */
    150172
    151 boolean
     173bfd_boolean
    152174ldemul_unrecognized_file (entry)
    153175     lang_input_statement_type *entry;
     
    155177  if (ld_emulation->unrecognized_file)
    156178    return (*ld_emulation->unrecognized_file) (entry);
    157   return false;
     179  return FALSE;
    158180}
    159181
    160182/* Let the emulation code handle a recognized file.  */
    161183
    162 boolean
     184bfd_boolean
    163185ldemul_recognized_file (entry)
    164186     lang_input_statement_type *entry;
     
    166188  if (ld_emulation->recognized_file)
    167189    return (*ld_emulation->recognized_file) (entry);
    168   return false;
     190  return FALSE;
    169191}
    170192
    171193char *
    172 ldemul_choose_target ()
    173 {
    174   return ld_emulation->choose_target ();
    175 }
     194ldemul_choose_target (argc, argv)
     195     int argc;
     196     char **argv;
     197{
     198  return ld_emulation->choose_target (argc, argv);
     199}
     200
    176201
    177202/* The default choose_target function.  */
    178203
    179204char *
    180 ldemul_default_target ()
     205ldemul_default_target (argc, argv)
     206     int argc ATTRIBUTE_UNUSED;
     207     char **argv ATTRIBUTE_UNUSED;
    181208{
    182209  char *from_outside = getenv (TARGET_ENVIRON);
     
    257284{
    258285  ld_emulation_xfer_type **eptr = ld_emulations;
    259   boolean first = true;
     286  bfd_boolean first = TRUE;
    260287
    261288  for (; *eptr; eptr++)
    262289    {
    263290      if (first)
    264         first = false;
     291        first = FALSE;
    265292      else
    266293        fprintf (f, " ");
     
    305332}
    306333
     334struct bfd_elf_version_expr *
     335ldemul_new_vers_pattern (entry)
     336     struct bfd_elf_version_expr *entry;
     337{
     338  if (ld_emulation->new_vers_pattern)
     339    entry = (*ld_emulation->new_vers_pattern) (entry);
     340  return entry;
     341}
     342
    307343/* Added by the EMX/OS2 port */
    308344void
  • trunk/src/binutils/ld/ldemul.h

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r617 r618  
    11/* ld-emul.h - Linker emulation header file
    2    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000
     2   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002
    33   Free Software Foundation, Inc.
    44
     
    1818#define LDEMUL_H
    1919
    20 extern void ldemul_hll PARAMS ((char *));
    21 extern void ldemul_syslib PARAMS ((char *));
    22 extern void ldemul_after_parse PARAMS ((void));
    23 extern void ldemul_before_parse PARAMS ((void));
    24 extern void ldemul_after_open PARAMS ((void));
    25 extern void ldemul_after_allocation PARAMS ((void));
    26 extern void ldemul_before_allocation PARAMS ((void));
    27 extern void ldemul_set_output_arch PARAMS ((void));
    28 extern char *ldemul_choose_target PARAMS ((void));
    29 extern void ldemul_choose_mode PARAMS ((char *));
    30 extern void ldemul_list_emulations PARAMS ((FILE *));
    31 extern void ldemul_list_emulation_options PARAMS ((FILE *));
    32 extern char *ldemul_get_script PARAMS ((int *isfile));
    33 extern void ldemul_finish PARAMS ((void));
    34 extern void ldemul_set_symbols PARAMS ((void));
    35 extern void ldemul_create_output_section_statements PARAMS ((void));
    36 extern boolean ldemul_place_orphan
     20extern void ldemul_hll
     21  PARAMS ((char *));
     22extern void ldemul_syslib
     23  PARAMS ((char *));
     24extern void ldemul_after_parse
     25  PARAMS ((void));
     26extern void ldemul_before_parse
     27  PARAMS ((void));
     28extern void ldemul_after_open
     29  PARAMS ((void));
     30extern void ldemul_after_allocation
     31  PARAMS ((void));
     32extern void ldemul_before_allocation
     33  PARAMS ((void));
     34extern void ldemul_set_output_arch
     35  PARAMS ((void));
     36extern char *ldemul_choose_target
     37  PARAMS ((int, char**));
     38extern void ldemul_choose_mode
     39  PARAMS ((char *));
     40extern void ldemul_list_emulations
     41  PARAMS ((FILE *));
     42extern void ldemul_list_emulation_options
     43  PARAMS ((FILE *));
     44extern char *ldemul_get_script
     45  PARAMS ((int *isfile));
     46extern void ldemul_finish
     47  PARAMS ((void));
     48extern void ldemul_set_symbols
     49  PARAMS ((void));
     50extern void ldemul_create_output_section_statements
     51  PARAMS ((void));
     52extern bfd_boolean ldemul_place_orphan
    3753  PARAMS ((struct lang_input_statement_struct *, asection *));
    38 extern int ldemul_parse_args PARAMS ((int, char **));
    39 extern boolean ldemul_unrecognized_file
     54extern bfd_boolean ldemul_parse_args
     55  PARAMS ((int, char **));
     56extern void ldemul_add_options
     57  PARAMS ((int, char **, int, struct option **, int, struct option **));
     58extern bfd_boolean ldemul_handle_option
     59  PARAMS ((int));
     60extern bfd_boolean ldemul_unrecognized_file
    4061  PARAMS ((struct lang_input_statement_struct *));
    41 extern boolean ldemul_recognized_file
     62extern bfd_boolean ldemul_recognized_file
    4263  PARAMS ((struct lang_input_statement_struct *));
    43 extern boolean ldemul_open_dynamic_archive
     64extern bfd_boolean ldemul_open_dynamic_archive
    4465  PARAMS ((const char *, struct search_dirs *,
    4566           struct lang_input_statement_struct *));
    46 extern char *ldemul_default_target PARAMS ((void));
    47 extern void after_parse_default PARAMS ((void));
    48 extern void after_open_default PARAMS ((void));
    49 extern void after_allocation_default PARAMS ((void));
    50 extern void before_allocation_default PARAMS ((void));
    51 extern void set_output_arch_default PARAMS ((void));
    52 extern void syslib_default PARAMS ((char*));
    53 extern void hll_default PARAMS ((char*));
     67extern char *ldemul_default_target
     68  PARAMS ((int, char**));
     69extern void after_parse_default
     70  PARAMS ((void));
     71extern void after_open_default
     72  PARAMS ((void));
     73extern void after_allocation_default
     74  PARAMS ((void));
     75extern void before_allocation_default
     76  PARAMS ((void));
     77extern void set_output_arch_default
     78  PARAMS ((void));
     79extern void syslib_default
     80  PARAMS ((char*));
     81extern void hll_default
     82  PARAMS ((char*));
    5483extern int  ldemul_find_potential_libraries
    5584  PARAMS ((char *, struct lang_input_statement_struct *));
     85extern struct bfd_elf_version_expr *ldemul_new_vers_pattern
     86  PARAMS ((struct bfd_elf_version_expr *));
    5687
    5788typedef struct ld_emulation_xfer_struct {
     
    79110
    80111  /* Decide which target name to use.  */
    81   char * (*choose_target) PARAMS ((void));
     112  char * (*choose_target) PARAMS ((int, char**));
    82113
    83114  /* Run before allocating output sections.  */
     
    102133     is normally the empty string.  ENTRY is the lang_input_statement
    103134     that should be opened.  */
    104   boolean (*open_dynamic_archive)
     135  bfd_boolean (*open_dynamic_archive)
    105136    PARAMS ((const char *arch, struct search_dirs *,
    106137             struct lang_input_statement_struct *entry));
    107138
    108   /* Place an orphan section.  Return true if it was placed, false if
     139  /* Place an orphan section.  Return TRUE if it was placed, FALSE if
    109140     the default action should be taken.  This field may be NULL, in
    110141     which case the default action will always be taken.  */
    111   boolean (*place_orphan)
     142  bfd_boolean (*place_orphan)
    112143    PARAMS ((struct lang_input_statement_struct *, asection *));
    113144
     
    116147  void  (*set_symbols) PARAMS ((void));
    117148
    118   /* Run to parse args which the base linker doesn't
    119      understand. Return non zero on sucess.  */
    120   int (*parse_args) PARAMS ((int, char **));
     149  /* Parse args which the base linker doesn't understand.
     150     Return TRUE if the arg needs no further processing.  */
     151  bfd_boolean (*parse_args) PARAMS ((int, char **));
     152
     153  /* Hook to add options to parameters passed by the base linker to
     154     getopt_long and getopt_long_only calls.  */
     155  void (*add_options)
     156    PARAMS ((int, char **, int, struct option **, int, struct option **));
     157
     158  /* Companion to the above to handle an option.  Returns TRUE if it is
     159     one of our options.  */
     160  bfd_boolean (*handle_option) PARAMS ((int));
    121161
    122162  /* Run to handle files which are not recognized as object files or
    123      archives.  Return true if the file was handled.  */
    124   boolean (*unrecognized_file)
     163     archives.  Return TRUE if the file was handled.  */
     164  bfd_boolean (*unrecognized_file)
    125165    PARAMS ((struct lang_input_statement_struct *));
    126166
     
    129169
    130170  /* Run to specially handle files which *are* recognized as object
    131      files or archives.  Return true if the file was handled.  */
    132   boolean (*recognized_file)
     171     files or archives.  Return TRUE if the file was handled.  */
     172  bfd_boolean (*recognized_file)
    133173    PARAMS ((struct lang_input_statement_struct *));
    134174
     
    140180    PARAMS ((char *, struct lang_input_statement_struct *));
    141181
     182  /* Called when adding a new version pattern.  PowerPC64-ELF uses
     183     this hook to add a pattern matching ".foo" for every "foo".  */
     184  struct bfd_elf_version_expr * (*new_vers_pattern)
     185    PARAMS ((struct bfd_elf_version_expr *));
     186
    142187  /* Perform final action(s) on output file
    143188     Note: Added by the EMX/OS2 port, so keep it at the end! */
  • trunk/src/binutils/ld/ldfile.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r617 r618  
    11/* Linker file opening and searching.
    2    Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001
     2   Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003
    33   Free Software Foundation, Inc.
    44
    5 This file is part of GLD, the Gnu Linker.
    6 
    7 GLD is free software; you can redistribute it and/or modify
    8 it under the terms of the GNU General Public License as published by
    9 the Free Software Foundation; either version 2, or (at your option)
    10 any later version.
    11 
    12 GLD is distributed in the hope that it will be useful,
    13 but WITHOUT ANY WARRANTY; without even the implied warranty of
    14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    15 GNU General Public License for more details.
    16 
    17 You should have received a copy of the GNU General Public License
    18 along with GLD; see the file COPYING.  If not, write to the Free
    19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
    20 02111-1307, USA.  */
     5   This file is part of GLD, the Gnu Linker.
     6
     7   GLD is free software; you can redistribute it and/or modify
     8   it under the terms of the GNU General Public License as published by
     9   the Free Software Foundation; either version 2, or (at your option)
     10   any later version.
     11
     12   GLD is distributed in the hope that it will be useful,
     13   but WITHOUT ANY WARRANTY; without even the implied warranty of
     14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15   GNU General Public License for more details.
     16
     17   You should have received a copy of the GNU General Public License
     18   along with GLD; see the file COPYING.  If not, write to the Free
     19   Software Foundation, 59 Temple Place - Suite 330, Boston, MA
     20   02111-1307, USA.  */
    2121
    2222/* ldfile.c:  look after all the file stuff.  */
     
    2525#include "sysdep.h"
    2626#include "bfdlink.h"
     27#include "safe-ctype.h"
    2728#include "ld.h"
    2829#include "ldmisc.h"
     
    3132#include "ldfile.h"
    3233#include "ldmain.h"
    33 #include "ldgram.h"
     34#include <ldgram.h>
    3435#include "ldlex.h"
    3536#include "ldemul.h"
    3637#include "libiberty.h"
    37 
    38 #include <ctype.h>
    39 
    40 const char *ldfile_input_filename;
    41 boolean ldfile_assumed_script = false;
    42 const char *ldfile_output_machine_name = "";
     38#include "filenames.h"
     39
     40const char * ldfile_input_filename;
     41bfd_boolean  ldfile_assumed_script = FALSE;
     42const char * ldfile_output_machine_name = "";
    4343unsigned long ldfile_output_machine;
    4444enum bfd_architecture ldfile_output_architecture;
    45 search_dirs_type *search_head;
     45search_dirs_type * search_head;
    4646
    4747#ifndef MPW
    4848#ifdef VMS
    49 char *slash = "";
     49char * slash = "";
    5050#else
    5151#if defined (_WIN32) && ! defined (__CYGWIN32__)
    52 char *slash = "\\";
     52char * slash = "\\";
    5353#else
    54 char *slash = "/";
     54char * slash = "/";
    5555#endif
    5656#endif
    5757#else /* MPW */
    5858/* The MPW path char is a colon.  */
    59 char *slash = ":";
     59char * slash = ":";
    6060#endif /* MPW */
    6161
    62 /* LOCAL */
    63 
    64 static search_dirs_type **search_tail_ptr = &search_head;
    65 
    66 typedef struct search_arch {
     62typedef struct search_arch
     63{
    6764  char *name;
    6865  struct search_arch *next;
    6966} search_arch_type;
    7067
     68static search_dirs_type **search_tail_ptr = &search_head;
    7169static search_arch_type *search_arch_head;
    7270static search_arch_type **search_arch_tail_ptr = &search_arch_head;
    7371
    74 static FILE *try_open PARAMS ((const char *name, const char *exten));
     72static FILE *try_open
     73  PARAMS ((const char *, const char *));
     74static bfd_boolean is_sysrooted_pathname
     75  PARAMS ((const char *, bfd_boolean));
     76
     77/* Test whether a pathname, after canonicalization, is the same or a
     78   sub-directory of the sysroot directory.  */
     79
     80static bfd_boolean
     81is_sysrooted_pathname (name, notsame)
     82     const char *name;
     83     bfd_boolean notsame;
     84{
     85  char * realname = ld_canon_sysroot ? lrealpath (name) : NULL;
     86  int len;
     87  bfd_boolean result;
     88
     89  if (! realname)
     90    return FALSE;
     91 
     92  len = strlen (realname);
     93
     94  if (((! notsame && len == ld_canon_sysroot_len)
     95       || (len >= ld_canon_sysroot_len
     96           && IS_DIR_SEPARATOR (realname[ld_canon_sysroot_len])
     97           && (realname[ld_canon_sysroot_len] = '\0') == '\0'))
     98      && FILENAME_CMP (ld_canon_sysroot, realname) == 0)
     99    result = TRUE;
     100  else
     101    result = FALSE;
     102
     103  if (realname)
     104    free (realname);
     105
     106  return result;
     107}
     108
     109/* Adds NAME to the library search path.
     110   Makes a copy of NAME using xmalloc().  */
    75111
    76112void
    77113ldfile_add_library_path (name, cmdline)
    78114     const char *name;
    79      boolean cmdline;
     115     bfd_boolean cmdline;
    80116{
    81117  search_dirs_type *new;
     118
     119  if (!cmdline && config.only_cmd_line_lib_dirs)
     120    return;
    82121
    83122  new = (search_dirs_type *) xmalloc (sizeof (search_dirs_type));
    84123  new->next = NULL;
    85   new->name = name;
    86124  new->cmdline = cmdline;
    87125  *search_tail_ptr = new;
    88126  search_tail_ptr = &new->next;
     127
     128  /* If a directory is marked as honoring sysroot, prepend the sysroot path
     129     now.  */
     130  if (name[0] == '=')
     131    {
     132      new->name = concat (ld_sysroot, name + 1, NULL);
     133      new->sysrooted = TRUE;
     134    }
     135  else
     136    {
     137      new->name = xstrdup (name);
     138      new->sysrooted = is_sysrooted_pathname (name, FALSE);
     139    }
    89140}
    90141
    91142/* Try to open a BFD for a lang_input_statement.  */
    92143
    93 boolean
     144bfd_boolean
    94145ldfile_try_open_bfd (attempt, entry)
    95146     const char *attempt;
     
    110161      if (bfd_get_error () == bfd_error_invalid_target)
    111162        einfo (_("%F%P: invalid BFD target `%s'\n"), entry->target);
    112       return false;
     163      return FALSE;
    113164    }
    114165
     
    130181        {
    131182          if (! bfd_check_format (check, bfd_object))
    132             return true;
    133           if (bfd_arch_get_compatible (check, output_bfd) == NULL)
     183            {
     184              if (check == entry->the_bfd
     185                  && bfd_get_error () == bfd_error_file_not_recognized
     186                  && ! ldemul_unrecognized_file (entry))
     187                {
     188                  int token, skip = 0;
     189                  char *arg, *arg1, *arg2, *arg3;
     190                  extern FILE *yyin;
     191
     192                  /* Try to interpret the file as a linker script.  */
     193                  ldfile_open_command_file (attempt);
     194
     195                  ldfile_assumed_script = TRUE;
     196                  parser_input = input_selected;
     197                  ldlex_both ();
     198                  token = INPUT_SCRIPT;
     199                  while (token != 0)
     200                    {
     201                      switch (token)
     202                        {
     203                        case OUTPUT_FORMAT:
     204                          if ((token = yylex ()) != '(')
     205                            continue;
     206                          if ((token = yylex ()) != NAME)
     207                            continue;
     208                          arg1 = yylval.name;
     209                          arg2 = NULL;
     210                          arg3 = NULL;
     211                          token = yylex ();
     212                          if (token == ',')
     213                            {
     214                              if ((token = yylex ()) != NAME)
     215                                {
     216                                  free (arg1);
     217                                  continue;
     218                                }
     219                              arg2 = yylval.name;
     220                              if ((token = yylex ()) != ','
     221                                  || (token = yylex ()) != NAME)
     222                                {
     223                                  free (arg1);
     224                                  free (arg2);
     225                                  continue;
     226                                }
     227                              arg3 = yylval.name;
     228                              token = yylex ();
     229                            }
     230                          if (token == ')')
     231                            {
     232                              switch (command_line.endian)
     233                                {
     234                                default:
     235                                case ENDIAN_UNSET:
     236                                  arg = arg1; break;
     237                                case ENDIAN_BIG:
     238                                  arg = arg2 ? arg2 : arg1; break;
     239                                case ENDIAN_LITTLE:
     240                                  arg = arg3 ? arg3 : arg1; break;
     241                                }
     242                              if (strcmp (arg, lang_get_output_target ()) != 0)
     243                                skip = 1;
     244                            }
     245                          free (arg1);
     246                          if (arg2) free (arg2);
     247                          if (arg3) free (arg3);
     248                          break;
     249                        case NAME:
     250                        case LNAME:
     251                        case VERS_IDENTIFIER:
     252                        case VERS_TAG:
     253                          free (yylval.name);
     254                          break;
     255                        case INT:
     256                          if (yylval.bigint.str)
     257                            free (yylval.bigint.str);
     258                          break;
     259                        }
     260                      token = yylex ();
     261                    }
     262                  ldlex_popstate ();
     263                  ldfile_assumed_script = FALSE;
     264                  fclose (yyin);
     265                  yyin = NULL;
     266                  if (skip)
     267                    {
     268                      einfo (_("%P: skipping incompatible %s when searching for %s\n"),
     269                             attempt, entry->local_sym_name);
     270                      bfd_close (entry->the_bfd);
     271                      entry->the_bfd = NULL;
     272                      return FALSE;
     273                    }
     274                }
     275              return TRUE;
     276            }
     277
     278          if ((bfd_arch_get_compatible (check, output_bfd,
     279                                        command_line.accept_unknown_input_arch) == NULL)
     280              /* XCOFF archives can have 32 and 64 bit objects.  */
     281              && ! (bfd_get_flavour (check) == bfd_target_xcoff_flavour
     282                    && bfd_get_flavour (output_bfd) == bfd_target_xcoff_flavour
     283                    && bfd_check_format (entry->the_bfd, bfd_archive)))
    134284            {
    135285              einfo (_("%P: skipping incompatible %s when searching for %s\n"),
     
    137287              bfd_close (entry->the_bfd);
    138288              entry->the_bfd = NULL;
    139               return false;
     289              return FALSE;
    140290            }
    141291        }
    142292    }
    143293
    144   return true;
     294  return TRUE;
    145295}
    146296
     
    148298   archive, use ARCH, LIB and SUFFIX to modify the file name.  */
    149299
    150 boolean
     300bfd_boolean
    151301ldfile_open_file_search (arch, entry, lib, suffix)
    152302     const char *arch;
     
    161311  if (! entry->is_archive)
    162312    {
    163       if (ldfile_try_open_bfd (entry->filename, entry))
    164         return true;
     313      if (entry->sysrooted && IS_ABSOLUTE_PATH (entry->filename))
     314        {
     315          char *name = concat (ld_sysroot, entry->filename,
     316                               (const char *) NULL);
     317          if (ldfile_try_open_bfd (name, entry))
     318            {
     319              entry->filename = name;
     320              return TRUE;
     321            }
     322          free (name);
     323        }
     324      else if (ldfile_try_open_bfd (entry->filename, entry))
     325        {
     326          entry->sysrooted = IS_ABSOLUTE_PATH (entry->filename)
     327            && is_sysrooted_pathname (entry->filename, TRUE);
     328          return TRUE;
     329        }
     330
     331      if (IS_ABSOLUTE_PATH (entry->filename))
     332        return FALSE;
    165333    }
    166334
     
    174342        {
    175343          if (ldemul_open_dynamic_archive (arch, search, entry))
    176             return true;
     344            {
     345              entry->sysrooted = search->sysrooted;
     346              return TRUE;
     347            }
    177348        }
    178349
     
    188359        sprintf (string, "%s%s%s%s%s%s", search->name, slash,
    189360                 lib, entry->filename, arch, suffix);
    190       else if (entry->filename[0] == '/' || entry->filename[0] == '.'
    191 #if defined (__MSDOS__) || defined (_WIN32)
    192                || entry->filename[0] == '\\'
    193                || (isalpha (entry->filename[0])
    194                    && entry->filename[1] == ':')
    195 #endif
    196           )
    197         strcpy (string, entry->filename);
    198361      else
    199362        sprintf (string, "%s%s%s", search->name, slash, entry->filename);
     
    202365        {
    203366          entry->filename = string;
    204           return true;
     367          entry->sysrooted = search->sysrooted;
     368          return TRUE;
    205369        }
    206370
     
    208372    }
    209373
    210   return false;
     374  return FALSE;
    211375}
    212376
     
    233397    {
    234398      search_arch_type *arch;
    235       boolean found = false;
     399      bfd_boolean found = FALSE;
    236400
    237401      /* Try to open <filename><suffix> or lib<filename><suffix>.a */
     
    261425         again.  */
    262426      if (found)
    263         entry->search_dirs_flag = false;
     427        entry->search_dirs_flag = FALSE;
     428      else if (entry->sysrooted
     429               && ld_sysroot
     430               && IS_ABSOLUTE_PATH (entry->local_sym_name))
     431        einfo (_("%F%P: cannot find %s inside %s\n"),
     432               entry->local_sym_name, ld_sysroot);
    264433      else
    265434        einfo (_("%F%P: cannot find %s\n"), entry->local_sym_name);
     
    308477
    309478/* Try to open NAME; if that fails, look for it in any directories
    310    specified with -L, without and with EXTEND apppended.  */
     479   specified with -L, without and with EXTEND appended.  */
    311480
    312481FILE *
     
    356525  ldfile_input_filename = name;
    357526  lineno = 1;
    358   had_script = true;
     527
     528  saved_script_handle = ldlex_input_stack;
    359529}
    360530
     
    419589void
    420590ldfile_add_arch (in_name)
    421      CONST char *in_name;
     591     const char *in_name;
    422592{
    423593  char *name = xstrdup (in_name);
     
    431601  while (*name)
    432602    {
    433       if (isupper ((unsigned char) *name))
    434         *name = tolower ((unsigned char) *name);
     603      *name = TOLOWER (*name);
    435604      name++;
    436605    }
     
    445614void
    446615ldfile_set_output_arch (string)
    447      CONST char *string;
     616     const char *string;
    448617{
    449618  const bfd_arch_info_type *arch = bfd_scan_arch (string);
  • trunk/src/binutils/ld/ldmain.c

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r617 r618  
    11/* Main program of GNU linker.
    2    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
     2   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
     3   2002, 2003
    34   Free Software Foundation, Inc.
    45   Written by Steve Chamberlain steve@cygnus.com
    56
    6 This file is part of GLD, the Gnu Linker.
    7 
    8 GLD is free software; you can redistribute it and/or modify
    9 it under the terms of the GNU General Public License as published by
    10 the Free Software Foundation; either version 2, or (at your option)
    11 any later version.
    12 
    13 GLD is distributed in the hope that it will be useful,
    14 but WITHOUT ANY WARRANTY; without even the implied warranty of
    15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16 GNU General Public License for more details.
    17 
    18 You should have received a copy of the GNU General Public License
    19 along with GLD; see the file COPYING.  If not, write to the Free
    20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
    21 02111-1307, USA.  */
     7   This file is part of GLD, the Gnu Linker.
     8
     9   GLD is free software; you can redistribute it and/or modify
     10   it under the terms of the GNU General Public License as published by
     11   the Free Software Foundation; either version 2, or (at your option)
     12   any later version.
     13
     14   GLD is distributed in the hope that it will be useful,
     15   but WITHOUT ANY WARRANTY; without even the implied warranty of
     16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     17   GNU General Public License for more details.
     18
     19   You should have received a copy of the GNU General Public License
     20   along with GLD; see the file COPYING.  If not, write to the Free
     21   Software Foundation, 59 Temple Place - Suite 330, Boston, MA
     22   02111-1307, USA.  */
    2223
    2324#include "bfd.h"
    2425#include "sysdep.h"
    2526#include <stdio.h>
    26 #include <ctype.h>
     27#include "safe-ctype.h"
    2728#include "libiberty.h"
    2829#include "progress.h"
     
    3435#include "ldmisc.h"
    3536#include "ldwrite.h"
    36 #include "ldgram.h"
    3737#include "ldexp.h"
    3838#include "ldlang.h"
     39#include <ldgram.h>
    3940#include "ldlex.h"
    4041#include "ldfile.h"
     
    4243#include "ldctor.h"
    4344
    44 /* Somewhere above, sys/stat.h got included . . . .  */
     45/* Somewhere above, sys/stat.h got included.  */
    4546#if !defined(S_ISDIR) && defined(S_IFDIR)
    4647#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
     
    5556#endif
    5657
    57 static char *get_emulation PARAMS ((int, char **));
    58 static void set_scripts_dir PARAMS ((void));
     58#ifndef TARGET_SYSTEM_ROOT
     59#define TARGET_SYSTEM_ROOT ""
     60#endif
     61
     62int main PARAMS ((int, char **));
    5963
    6064/* EXPORTS */
     
    6670char *program_name;
    6771
     72/* The prefix for system library directories.  */
     73char *ld_sysroot;
     74
     75/* The canonical representation of ld_sysroot.  */
     76char * ld_canon_sysroot;
     77int ld_canon_sysroot_len;
     78
    6879/* The file that we're creating.  */
    6980bfd *output_bfd = 0;
     
    7384
    7485/* Nonzero means print names of input files as processed.  */
    75 boolean trace_files;
     86bfd_boolean trace_files;
    7687
    7788/* Nonzero means same, but note open failures, too.  */
    78 boolean trace_file_tries;
     89bfd_boolean trace_file_tries;
    7990
    8091/* Nonzero means version number was printed, so exit successfully
    8192   instead of complaining if no input files are given.  */
    82 boolean version_printed;
     93bfd_boolean version_printed;
    8394
    8495/* Nonzero means link in every member of an archive.  */
    85 boolean whole_archive;
    86 
    87 /* True if we should demangle symbol names.  */
    88 boolean demangling;
     96bfd_boolean whole_archive;
     97
     98/* TRUE if we should demangle symbol names.  */
     99bfd_boolean demangling;
    89100
    90101args_type command_line;
     
    92103ld_config_type config;
    93104
    94 static void remove_output PARAMS ((void));
    95 static boolean check_for_scripts_dir PARAMS ((char *dir));
    96 static boolean add_archive_element PARAMS ((struct bfd_link_info *, bfd *,
    97                                             const char *));
    98 static boolean multiple_definition PARAMS ((struct bfd_link_info *,
    99                                             const char *,
    100                                             bfd *, asection *, bfd_vma,
    101                                             bfd *, asection *, bfd_vma));
    102 static boolean multiple_common PARAMS ((struct bfd_link_info *,
    103                                         const char *, bfd *,
    104                                         enum bfd_link_hash_type, bfd_vma,
    105                                         bfd *, enum bfd_link_hash_type,
    106                                         bfd_vma));
    107 static boolean add_to_set PARAMS ((struct bfd_link_info *,
    108                                    struct bfd_link_hash_entry *,
    109                                    bfd_reloc_code_real_type,
    110                                    bfd *, asection *, bfd_vma));
    111 static boolean constructor_callback PARAMS ((struct bfd_link_info *,
    112                                              boolean constructor,
    113                                              const char *name,
    114                                              bfd *, asection *, bfd_vma));
    115 static boolean warning_callback PARAMS ((struct bfd_link_info *,
    116                                          const char *, const char *, bfd *,
    117                                          asection *, bfd_vma));
    118 static void warning_find_reloc PARAMS ((bfd *, asection *, PTR));
    119 static boolean undefined_symbol PARAMS ((struct bfd_link_info *,
    120                                          const char *, bfd *,
    121                                          asection *, bfd_vma, boolean));
    122 static boolean reloc_overflow PARAMS ((struct bfd_link_info *, const char *,
    123                                        const char *, bfd_vma,
    124                                        bfd *, asection *, bfd_vma));
    125 static boolean reloc_dangerous PARAMS ((struct bfd_link_info *, const char *,
    126                                         bfd *, asection *, bfd_vma));
    127 static boolean unattached_reloc PARAMS ((struct bfd_link_info *,
    128                                          const char *, bfd *, asection *,
    129                                          bfd_vma));
    130 static boolean notice PARAMS ((struct bfd_link_info *, const char *,
    131                                bfd *, asection *, bfd_vma));
    132 
    133 static struct bfd_link_callbacks link_callbacks = {
     105static char *get_emulation
     106  PARAMS ((int, char **));
     107static void set_scripts_dir
     108  PARAMS ((void));
     109static void remove_output
     110  PARAMS ((void));
     111static bfd_boolean check_for_scripts_dir
     112  PARAMS ((char *));
     113static bfd_boolean add_archive_element
     114  PARAMS ((struct bfd_link_info *, bfd *, const char *));
     115static bfd_boolean multiple_definition
     116  PARAMS ((struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma,
     117           bfd *, asection *, bfd_vma));
     118static bfd_boolean multiple_common
     119  PARAMS ((struct bfd_link_info *, const char *, bfd *,
     120           enum bfd_link_hash_type, bfd_vma, bfd *, enum bfd_link_hash_type,
     121           bfd_vma));
     122static bfd_boolean add_to_set
     123  PARAMS ((struct bfd_link_info *, struct bfd_link_hash_entry *,
     124           bfd_reloc_code_real_type, bfd *, asection *, bfd_vma));
     125static bfd_boolean constructor_callback
     126  PARAMS ((struct bfd_link_info *, bfd_boolean, const char *, bfd *,
     127           asection *, bfd_vma));
     128static bfd_boolean warning_callback
     129  PARAMS ((struct bfd_link_info *, const char *, const char *, bfd *,
     130           asection *, bfd_vma));
     131static void warning_find_reloc
     132  PARAMS ((bfd *, asection *, PTR));
     133static bfd_boolean undefined_symbol
     134  PARAMS ((struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma,
     135           bfd_boolean));
     136static bfd_boolean reloc_overflow
     137  PARAMS ((struct bfd_link_info *, const char *, const char *, bfd_vma,
     138           bfd *, asection *, bfd_vma));
     139static bfd_boolean reloc_dangerous
     140  PARAMS ((struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma));
     141static bfd_boolean unattached_reloc
     142  PARAMS ((struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma));
     143static bfd_boolean notice
     144  PARAMS ((struct bfd_link_info *, const char *, bfd *, asection *, bfd_vma));
     145
     146static struct bfd_link_callbacks link_callbacks =
     147{
    134148  add_archive_element,
    135149  multiple_definition,
     
    142156  reloc_dangerous,
    143157  unattached_reloc,
    144   notice
     158  notice,
     159  error_handler
    145160};
    146161
     
    170185#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
    171186  setlocale (LC_MESSAGES, "");
     187#endif
     188#if defined (HAVE_SETLOCALE)
     189  setlocale (LC_CTYPE, "");
    172190#endif
    173191  bindtextdomain (PACKAGE, LOCALEDIR);
     
    190208  xatexit (remove_output);
    191209
     210#ifdef TARGET_SYSTEM_ROOT_RELOCATABLE
     211  ld_sysroot = make_relative_prefix (program_name, BINDIR,
     212                                     TARGET_SYSTEM_ROOT);
     213
     214  if (ld_sysroot)
     215    {
     216      struct stat s;
     217      int res = stat (ld_sysroot, &s) == 0 && S_ISDIR (s.st_mode);
     218
     219      if (!res)
     220        {
     221          free (ld_sysroot);
     222          ld_sysroot = NULL;
     223        }
     224    }
     225
     226  if (! ld_sysroot)
     227    {
     228      ld_sysroot = make_relative_prefix (program_name, TOOLBINDIR,
     229                                         TARGET_SYSTEM_ROOT);
     230
     231      if (ld_sysroot)
     232        {
     233          struct stat s;
     234          int res = stat (ld_sysroot, &s) == 0 && S_ISDIR (s.st_mode);
     235
     236          if (!res)
     237            {
     238              free (ld_sysroot);
     239              ld_sysroot = NULL;
     240            }
     241        }
     242    }
     243
     244  if (! ld_sysroot)
     245#endif
     246    ld_sysroot = TARGET_SYSTEM_ROOT;
     247
     248  if (ld_sysroot && *ld_sysroot)
     249    ld_canon_sysroot = lrealpath (ld_sysroot);
     250
     251  if (ld_canon_sysroot)
     252    ld_canon_sysroot_len = strlen (ld_canon_sysroot);
     253  else
     254    ld_canon_sysroot_len = -1;
     255
    192256  /* Set the default BFD target based on the configured target.  Doing
    193257     this permits the linker to be configured for a particular target,
     
    200264    }
    201265
     266#if YYDEBUG
     267  {
     268    extern int yydebug;
     269    yydebug = 1;
     270  }
     271#endif
     272
    202273  /* Initialize the data about options.  */
    203   trace_files = trace_file_tries = version_printed = false;
    204   whole_archive = false;
    205   config.build_constructors = true;
    206   config.dynamic_link = false;
    207   config.has_shared = false;
     274  trace_files = trace_file_tries = version_printed = FALSE;
     275  whole_archive = FALSE;
     276  config.build_constructors = TRUE;
     277  config.dynamic_link = FALSE;
     278  config.has_shared = FALSE;
    208279  config.split_by_reloc = (unsigned) -1;
    209280  config.split_by_file = (bfd_size_type) -1;
    210   command_line.force_common_definition = false;
     281  command_line.force_common_definition = FALSE;
     282  command_line.inhibit_common_definition = FALSE;
    211283  command_line.interpreter = NULL;
    212284  command_line.rpath = NULL;
    213   command_line.warn_mismatch = true;
    214   command_line.check_section_addresses = true;
     285  command_line.warn_mismatch = TRUE;
     286  command_line.check_section_addresses = TRUE;
     287  command_line.accept_unknown_input_arch = FALSE;
    215288
    216289  /* We initialize DEMANGLING based on the environment variable
     
    221294  demangling = getenv ("COLLECT_NO_DEMANGLE") == NULL;
    222295
     296  link_info.relocateable = FALSE;
     297  link_info.emitrelocations = FALSE;
     298  link_info.task_link = FALSE;
     299  link_info.shared = FALSE;
     300  link_info.symbolic = FALSE;
     301  link_info.export_dynamic = FALSE;
     302  link_info.static_link = FALSE;
     303  link_info.traditional_format = FALSE;
     304  link_info.optimize = FALSE;
     305  link_info.no_undefined = FALSE;
     306  link_info.allow_shlib_undefined = TRUE;
     307  link_info.allow_multiple_definition = FALSE;
     308  link_info.allow_undefined_version = TRUE;
     309  link_info.keep_memory = TRUE;
     310  link_info.notice_all = FALSE;
     311  link_info.nocopyreloc = FALSE;
     312  link_info.new_dtags = FALSE;
     313  link_info.combreloc = TRUE;
     314  link_info.eh_frame_hdr = FALSE;
     315  link_info.strip_discarded = TRUE;
     316  link_info.strip = strip_none;
     317  link_info.discard = discard_sec_merge;
     318  link_info.common_skip_ar_aymbols = bfd_link_common_skip_none;
    223319  link_info.callbacks = &link_callbacks;
    224   link_info.relocateable = false;
    225   link_info.emitrelocations = false;
    226   link_info.shared = false;
    227   link_info.symbolic = false;
    228   link_info.static_link = false;
    229   link_info.traditional_format = false;
    230   link_info.optimize = false;
    231   link_info.no_undefined = false;
    232   link_info.allow_shlib_undefined = false;
    233   link_info.strip = strip_none;
    234   link_info.discard = discard_none;
    235   link_info.keep_memory = true;
     320  link_info.hash = NULL;
     321  link_info.keep_hash = NULL;
     322  link_info.notice_hash = NULL;
     323  link_info.wrap_hash = NULL;
    236324  link_info.input_bfds = NULL;
    237325  link_info.create_object_symbols_section = NULL;
    238   link_info.hash = NULL;
    239   link_info.keep_hash = NULL;
    240   link_info.notice_all = false;
    241   link_info.notice_hash = NULL;
    242   link_info.wrap_hash = NULL;
    243   link_info.mpc860c0 = 0;
     326  link_info.gc_sym_list = NULL;
     327  link_info.base_file = NULL;
    244328  /* SVR4 linkers seem to set DT_INIT and DT_FINI based on magic _init
    245329     and _fini symbols.  We are compatible.  */
    246330  link_info.init_function = "_init";
    247331  link_info.fini_function = "_fini";
    248   link_info.new_dtags = false;
     332  link_info.mpc860c0 = 0;
     333  link_info.pei386_auto_import = -1;
     334  link_info.pei386_runtime_pseudo_reloc = FALSE;
     335  link_info.spare_dynamic_tags = 5;
    249336  link_info.flags = (bfd_vma) 0;
    250337  link_info.flags_1 = (bfd_vma) 0;
     338  link_info.relax_finalizing = FALSE;
    251339
    252340  ldfile_add_arch ("");
    253341
    254   config.make_executable = true;
    255   force_make_executable = false;
    256   config.magic_demand_paged = true;
    257   config.text_read_only = true;
     342  config.make_executable = TRUE;
     343  force_make_executable = FALSE;
     344  config.magic_demand_paged = TRUE;
     345  config.text_read_only = TRUE;
    258346
    259347  emulation = get_emulation (argc, argv);
    260348  ldemul_choose_mode (emulation);
    261   default_target = ldemul_choose_target ();
     349  default_target = ldemul_choose_target (argc, argv);
    262350  lang_init ();
    263351  ldemul_before_parse ();
    264   lang_has_input_file = false;
     352  lang_has_input_file = FALSE;
    265353  parse_args (argc, argv);
    266354
     
    279367    }
    280368
     369  if (! link_info.shared)
     370    {
     371      if (command_line.filter_shlib)
     372        einfo (_("%P%F: -F may not be used without -shared\n"));
     373      if (command_line.auxiliary_filters)
     374        einfo (_("%P%F: -f may not be used without -shared\n"));
     375    }
     376
    281377  /* Treat ld -r -s as ld -r -S -x (i.e., strip all local symbols).  I
    282378     don't see how else this can be handled, since in this case we
     
    285381    {
    286382      link_info.strip = strip_debugger;
    287       if (link_info.discard == discard_none)
     383      if (link_info.discard == discard_sec_merge)
    288384        link_info.discard = discard_all;
    289385    }
     
    293389  set_scripts_dir ();
    294390
    295   if (had_script == false)
    296     {
    297       /* Read the emulation's appropriate default script.  */
     391  /* If we have not already opened and parsed a linker script
     392     read the emulation's appropriate default script.  */
     393  if (saved_script_handle == NULL)
     394    {
    298395      int isfile;
    299396      char *s = ldemul_get_script (&isfile);
     
    303400      else
    304401        {
    305           if (trace_file_tries)
    306             {
    307               info_msg (_("using internal linker script:\n"));
    308               info_msg ("==================================================\n");
    309               info_msg (s);
    310               info_msg ("\n==================================================\n");
    311             }
    312402          lex_string = s;
    313403          lex_redirect (s);
     
    318408    }
    319409
     410  if (trace_file_tries)
     411    {
     412      if (saved_script_handle)
     413        info_msg (_("using external linker script:"));
     414      else
     415        info_msg (_("using internal linker script:"));
     416      info_msg ("\n==================================================\n");
     417
     418      if (saved_script_handle)
     419        {
     420          static const int ld_bufsz = 8193;
     421          size_t n;
     422          char *buf = xmalloc (ld_bufsz);
     423
     424          rewind (saved_script_handle);
     425          while ((n = fread (buf, 1, ld_bufsz - 1, saved_script_handle)) > 0)
     426            {
     427              buf[n] = 0;
     428              info_msg (buf);
     429            }
     430          rewind (saved_script_handle);
     431          free (buf);
     432        }
     433      else
     434        {
     435          int isfile;
     436
     437          info_msg (ldemul_get_script (&isfile));
     438        }
     439
     440      info_msg ("\n==================================================\n");
     441    }
     442
    320443  lang_final ();
    321444
    322   if (lang_has_input_file == false)
     445  if (!lang_has_input_file)
    323446    {
    324447      if (version_printed)
     
    328451
    329452  if (trace_files)
    330     {
    331       info_msg (_("%P: mode %s\n"), emulation);
    332     }
     453    info_msg (_("%P: mode %s\n"), emulation);
    333454
    334455  ldemul_after_parse ();
     
    356477  /* Print error messages for any missing symbols, for any warning
    357478     symbols, and possibly multiple definitions.  */
    358 
    359   if (! link_info.relocateable)
    360     {
    361       /* Look for a text section and switch the readonly attribute in it.  */
    362       asection *found = bfd_get_section_by_name (output_bfd, ".text");
    363 
    364       if (found != (asection *) NULL)
    365         {
    366           if (config.text_read_only)
    367             found->flags |= SEC_READONLY;
    368           else
    369             found->flags &= ~SEC_READONLY;
    370         }
    371     }
    372 
    373479  if (link_info.relocateable)
    374480    output_bfd->flags &= ~EXEC_P;
     
    388494     be reported in the exit status.  (What non-fatal errors, if any, do we
    389495     want to ignore for relocateable output?)  */
    390 
    391   if (config.make_executable == false && force_make_executable == false)
    392     {
    393       if (trace_files == true)
    394         {
    395           einfo (_("%P: link errors found, deleting executable `%s'\n"),
    396                  output_filename);
    397         }
     496  if (!config.make_executable && !force_make_executable)
     497    {
     498      if (trace_files)
     499        einfo (_("%P: link errors found, deleting executable `%s'\n"),
     500               output_filename);
    398501
    399502      /* The file will be removed by remove_output.  */
    400 
    401503      xexit (1);
    402504    }
     
    416518        {
    417519          int len = strlen (output_filename);
     520
    418521          if (len < 4
    419522              || (strcasecmp (output_filename + len - 4, ".exe") != 0
     
    426529              int l;
    427530              char *dst_name = xmalloc (len + 5);
     531
    428532              strcpy (dst_name, output_filename);
    429533              strcat (dst_name, ".exe");
     
    438542                {
    439543                  int done = fwrite (buf, 1, l, dst);
     544
    440545                  if (done != l)
    441                     {
    442                       einfo (_("%P: Error writing file `%s'\n"), dst_name);
    443                     }
     546                    einfo (_("%P: Error writing file `%s'\n"), dst_name);
    444547                }
     548
    445549              fclose (src);
    446550              if (fclose (dst) == EOF)
    447                 {
    448                   einfo (_("%P: Error closing file `%s'\n"), dst_name);
    449                 }
     551                einfo (_("%P: Error closing file `%s'\n"), dst_name);
    450552              free (dst_name);
    451553              free (buf);
     
    506608                }
    507609              else
    508                 {
    509                   einfo (_("%P%F: missing argument to -m\n"));
    510                 }
     610                einfo (_("%P%F: missing argument to -m\n"));
    511611            }
    512612          else if (strcmp (argv[i], "-mips1") == 0
    513613                   || strcmp (argv[i], "-mips2") == 0
    514614                   || strcmp (argv[i], "-mips3") == 0
    515                    || strcmp (argv[i], "-mips4") == 0)
     615                   || strcmp (argv[i], "-mips4") == 0
     616                   || strcmp (argv[i], "-mips5") == 0
     617                   || strcmp (argv[i], "-mips32") == 0
     618                   || strcmp (argv[i], "-mips32r2") == 0
     619                   || strcmp (argv[i], "-mips64") == 0)
    516620            {
    517               /* FIXME: The arguments -mips1, -mips2 and -mips3 are
     621              /* FIXME: The arguments -mips1, -mips2, -mips3, etc. are
    518622                 passed to the linker by some MIPS compilers.  They
    519623                 generally tell the linker to use a slightly different
     
    541645
    542646/* If directory DIR contains an "ldscripts" subdirectory,
    543    add DIR to the library search path and return true,
    544    else return false.  */
    545 
    546 static boolean
     647   add DIR to the library search path and return TRUE,
     648   else return FALSE.  */
     649
     650static bfd_boolean
    547651check_for_scripts_dir (dir)
    548652     char *dir;
     
    551655  char *buf;
    552656  struct stat s;
    553   boolean res;
     657  bfd_boolean res;
    554658
    555659  dirlen = strlen (dir);
     
    561665  free (buf);
    562666  if (res)
    563     ldfile_add_library_path (dir, false);
     667    ldfile_add_library_path (dir, FALSE);
    564668  return res;
    565669}
     
    570674
    571675   SCRIPTDIR (passed from Makefile)
     676             (adjusted according to the current location of the binary)
     677   SCRIPTDIR (passed from Makefile)
    572678   the dir where this program is (for using it from the build tree)
    573    the dir where this program is/../lib (for installing the tool suite elsewhere) */
     679   the dir where this program is/../lib
     680             (for installing the tool suite elsewhere).  */
    574681
    575682static void
     
    578685  char *end, *dir;
    579686  size_t dirlen;
     687  bfd_boolean found;
     688
     689  dir = make_relative_prefix (program_name, BINDIR, SCRIPTDIR);
     690  if (dir)
     691    {
     692      found = check_for_scripts_dir (dir);
     693      free (dir);
     694      if (found)
     695        return;
     696    }
     697
     698  dir = make_relative_prefix (program_name, TOOLBINDIR, SCRIPTDIR);
     699  if (dir)
     700    {
     701      found = check_for_scripts_dir (dir);
     702      free (dir);
     703      if (found)
     704        return;
     705    }
    580706
    581707  if (check_for_scripts_dir (SCRIPTDIR))
     
    589715    /* We could have \foo\bar, or /foo\bar.  */
    590716    char *bslash = strrchr (program_name, '\\');
     717
    591718    if (end == NULL || (bslash != NULL && bslash > end))
    592719      end = bslash;
     
    595722
    596723  if (end == NULL)
    597     {
    598       /* Don't look for ldscripts in the current directory.  There is
    599          too much potential for confusion.  */
    600       return;
    601     }
     724    /* Don't look for ldscripts in the current directory.  There is
     725       too much potential for confusion.  */
     726    return;
    602727
    603728  dirlen = end - program_name;
     
    609734
    610735  if (check_for_scripts_dir (dir))
    611     /* Don't free dir.  */
    612     return;
     736    {
     737      free (dir);
     738      return;
     739    }
    613740
    614741  /* Look for "ldscripts" in <the dir where our binary is>/../lib.  */
    615742  strcpy (dir + dirlen, "/../lib");
    616   if (check_for_scripts_dir (dir))
    617     return;
    618 
    619   /* Well, we tried.  */
     743  check_for_scripts_dir (dir);
    620744  free (dir);
    621745}
     
    635759    }
    636760
    637   if (bfd_hash_lookup (link_info.notice_hash, name, true, true)
     761  if (bfd_hash_lookup (link_info.notice_hash, name, TRUE, TRUE)
    638762      == (struct bfd_hash_entry *) NULL)
    639763    einfo (_("%P%F: bfd_hash_lookup failed: %E\n"));
     
    655779        einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
    656780    }
    657   if (bfd_hash_lookup (link_info.wrap_hash, name, true, true) == NULL)
     781
     782  if (bfd_hash_lookup (link_info.wrap_hash, name, TRUE, TRUE) == NULL)
    658783    einfo (_("%P%F: bfd_hash_lookup failed: %E\n"));
    659784}
     
    692817  while (c != EOF)
    693818    {
    694       while (isspace (c))
     819      while (ISSPACE (c))
    695820        c = getc (file);
    696821
     
    699824          size_t len = 0;
    700825
    701           while (! isspace (c) && c != EOF)
     826          while (! ISSPACE (c) && c != EOF)
    702827            {
    703828              buf[len] = c;
     
    713838          buf[len] = '\0';
    714839
    715           if (bfd_hash_lookup (link_info.keep_hash, buf, true, true)
     840          if (bfd_hash_lookup (link_info.keep_hash, buf, TRUE, TRUE)
    716841              == (struct bfd_hash_entry *) NULL)
    717842            einfo (_("%P%F: bfd_hash_lookup for insertion failed: %E\n"));
     
    722847    einfo (_("%P: `-retain-symbols-file' overrides `-s' and `-S'\n"));
    723848
     849  free (buf);
    724850  link_info.strip = strip_some;
    725851}
     
    731857   a link.  */
    732858
    733 static boolean
     859static bfd_boolean
    734860add_archive_element (info, abfd, name)
    735861     struct bfd_link_info *info ATTRIBUTE_UNUSED;
     
    746872  input->asymbols = NULL;
    747873  input->next = NULL;
    748   input->just_syms_flag = false;
    749   input->loaded = false;
    750   input->search_dirs_flag = false;
     874  input->just_syms_flag = FALSE;
     875  input->loaded = FALSE;
     876  input->search_dirs_flag = FALSE;
    751877
    752878  /* FIXME: The following fields are not set: header.next,
     
    760886  if (config.map_file != (FILE *) NULL)
    761887    {
    762       static boolean header_printed;
     888      static bfd_boolean header_printed;
    763889      struct bfd_link_hash_entry *h;
    764890      bfd *from;
    765891      int len;
    766892
    767       h = bfd_link_hash_lookup (link_info.hash, name, false, false, true);
     893      h = bfd_link_hash_lookup (link_info.hash, name, FALSE, FALSE, TRUE);
    768894
    769895      if (h == NULL)
     
    797923          char buf[100];
    798924
    799           sprintf (buf, "%-29s %s\n\n", _("Archive member included"),
    800                    _("because of file (symbol)"));
     925          sprintf (buf, _("Archive member included because of file (symbol)\n\n"));
    801926          minfo ("%s", buf);
    802           header_printed = true;
     927          header_printed = TRUE;
    803928        }
    804929
     
    839964    info_msg ("%I\n", input);
    840965
    841   return true;
     966  return TRUE;
    842967}
    843968
     
    845970   multiple times.  */
    846971
    847 static boolean
     972static bfd_boolean
    848973multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval)
    849974     struct bfd_link_info *info ATTRIBUTE_UNUSED;
     
    867992          && ! bfd_is_abs_section (nsec)
    868993          && bfd_is_abs_section (nsec->output_section)))
    869     return true;
     994    return TRUE;
    870995
    871996  einfo (_("%X%C: multiple definition of `%T'\n"),
     
    8801005    }
    8811006
    882   return true;
     1007  return TRUE;
    8831008}
    8841009
     
    8881013   -warn-common was used.  */
    8891014
    890 static boolean
     1015static bfd_boolean
    8911016multiple_common (info, name, obfd, otype, osize, nbfd, ntype, nsize)
    8921017     struct bfd_link_info *info ATTRIBUTE_UNUSED;
     
    9001025{
    9011026  if (! config.warn_common)
    902     return true;
     1027    return TRUE;
    9031028
    9041029  if (ntype == bfd_link_hash_defined
     
    9471072    }
    9481073
    949   return true;
     1074  return TRUE;
    9501075}
    9511076
     
    9541079   represent a value which should be added to the set.  */
    9551080
    956 static boolean
     1081static bfd_boolean
    9571082add_to_set (info, h, reloc, abfd, section, value)
    9581083     struct bfd_link_info *info ATTRIBUTE_UNUSED;
     
    9681093
    9691094  if (! config.build_constructors)
    970     return true;
     1095    return TRUE;
    9711096
    9721097  ldctor_add_set_entry (h, reloc, (const char *) NULL, section, value);
     
    9811106    }
    9821107
    983   return true;
     1108  return TRUE;
    9841109}
    9851110
     
    9891114   adding an element to a set, but less general.  */
    9901115
    991 static boolean
     1116static bfd_boolean
    9921117constructor_callback (info, constructor, name, abfd, section, value)
    9931118     struct bfd_link_info *info;
    994      boolean constructor;
     1119     bfd_boolean constructor;
    9951120     const char *name;
    9961121     bfd *abfd;
     
    10061131
    10071132  if (! config.build_constructors)
    1008     return true;
     1133    return TRUE;
    10091134
    10101135  /* Ensure that BFD_RELOC_CTOR exists now, so that we can give a
     
    10231148    strcpy (s, "__DTOR_LIST__");
    10241149
    1025   h = bfd_link_hash_lookup (info->hash, set_name, true, true, true);
     1150  h = bfd_link_hash_lookup (info->hash, set_name, TRUE, TRUE, TRUE);
    10261151  if (h == (struct bfd_link_hash_entry *) NULL)
    10271152    einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n"));
     
    10361161
    10371162  ldctor_add_set_entry (h, BFD_RELOC_CTOR, name, section, value);
    1038   return true;
     1163  return TRUE;
    10391164}
    10401165
     
    10421167   bfd_map_over_sections.  */
    10431168
    1044 struct warning_callback_info {
    1045   boolean found;
     1169struct warning_callback_info
     1170{
     1171  bfd_boolean found;
    10461172  const char *warning;
    10471173  const char *symbol;
     
    10511177/* This is called when there is a reference to a warning symbol.  */
    10521178
    1053 static boolean
     1179static bfd_boolean
    10541180warning_callback (info, warning, symbol, abfd, section, address)
    10551181     struct bfd_link_info *info ATTRIBUTE_UNUSED;
     
    10641190  if (! config.warn_multiple_gp
    10651191      && strcmp (warning, "using multiple gp values") == 0)
    1066     return true;
     1192    return TRUE;
    10671193
    10681194  if (section != NULL)
     
    10801206      /* Look through the relocs to see if we can find a plausible
    10811207         address.  */
    1082 
    10831208      entry = (lang_input_statement_type *) abfd->usrdata;
    10841209      if (entry != NULL && entry->asymbols != NULL)
     
    11031228        }
    11041229
    1105       info.found = false;
     1230      info.found = FALSE;
    11061231      info.warning = warning;
    11071232      info.symbol = symbol;
     
    11161241    }
    11171242
    1118   return true;
     1243  return TRUE;
    11191244}
    11201245
     
    11621287          /* We found a reloc for the symbol we are looking for.  */
    11631288          einfo ("%C: %s\n", abfd, sec, q->address, info->warning);
    1164           info->found = true;
     1289          info->found = TRUE;
    11651290          break;
    11661291        }
     
    11721297/* This is called when an undefined symbol is found.  */
    11731298
    1174 static boolean
     1299static bfd_boolean
    11751300undefined_symbol (info, name, abfd, section, address, fatal)
    11761301     struct bfd_link_info *info ATTRIBUTE_UNUSED;
     
    11791304     asection *section;
    11801305     bfd_vma address;
    1181      boolean fatal ATTRIBUTE_UNUSED;
     1306     bfd_boolean fatal ATTRIBUTE_UNUSED;
    11821307{
    11831308  static char *error_name;
     
    11911316
    11921317      /* Only warn once about a particular undefined symbol.  */
    1193 
    11941318      if (hash == NULL)
    11951319        {
     
    12001324        }
    12011325
    1202       if (bfd_hash_lookup (hash, name, false, false) != NULL)
    1203         return true;
    1204 
    1205       if (bfd_hash_lookup (hash, name, true, true) == NULL)
     1326      if (bfd_hash_lookup (hash, name, FALSE, FALSE) != NULL)
     1327        return TRUE;
     1328
     1329      if (bfd_hash_lookup (hash, name, TRUE, TRUE) == NULL)
    12061330        einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
    12071331    }
     
    12471371    }
    12481372
    1249   return true;
     1373  return TRUE;
    12501374}
    12511375
    12521376/* This is called when a reloc overflows.  */
    12531377
    1254 static boolean
     1378static bfd_boolean
    12551379reloc_overflow (info, name, reloc_name, addend, abfd, section, address)
    12561380     struct bfd_link_info *info ATTRIBUTE_UNUSED;
     
    12701394    einfo ("+%v", addend);
    12711395  einfo ("\n");
    1272   return true;
     1396  return TRUE;
    12731397}
    12741398
    12751399/* This is called when a dangerous relocation is made.  */
    12761400
    1277 static boolean
     1401static bfd_boolean
    12781402reloc_dangerous (info, message, abfd, section, address)
    12791403     struct bfd_link_info *info ATTRIBUTE_UNUSED;
     
    12881412    einfo ("%X%C:", abfd, section, address);
    12891413  einfo (_("dangerous relocation: %s\n"), message);
    1290   return true;
     1414  return TRUE;
    12911415}
    12921416
     
    12941418   that is not being output.  */
    12951419
    1296 static boolean
     1420static bfd_boolean
    12971421unattached_reloc (info, name, abfd, section, address)
    12981422     struct bfd_link_info *info ATTRIBUTE_UNUSED;
     
    13071431    einfo ("%X%C:", abfd, section, address);
    13081432  einfo (_(" reloc refers to symbol `%T' which is not being output\n"), name);
    1309   return true;
     1433  return TRUE;
    13101434}
    13111435
     
    13141438   using the -y option.  */
    13151439
    1316 static boolean
     1440static bfd_boolean
    13171441notice (info, name, abfd, section, value)
    13181442     struct bfd_link_info *info;
     
    13241448  if (! info->notice_all
    13251449      || (info->notice_hash != NULL
    1326           && bfd_hash_lookup (info->notice_hash, name, false, false) != NULL))
     1450          && bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE) != NULL))
    13271451    {
    13281452      if (bfd_is_und_section (section))
     
    13351459    add_cref (name, abfd, section, value);
    13361460
    1337   return true;
    1338 }
     1461  return TRUE;
     1462}
Note: See TracChangeset for help on using the changeset viewer.