home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / gnu / djgpp / src / binutils.2 / ld / e_z8ksim.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-30  |  2.0 KB  |  85 lines

  1. /* Copyright (C) 1991 Free Software Foundation, Inc.
  2.  
  3. This file is part of GLD, the Gnu Linker.
  4.  
  5. GLD is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 1, or (at your option)
  8. any later version.
  9.  
  10. GLD is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. GNU General Public License for more details.
  14.  
  15. You should have received a copy of the GNU General Public License
  16. along with GLD; see the file COPYING.  If not, write to
  17. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. /* 
  20.  Written by Steve Chamberlain steve@cygnus.com
  21.  
  22. */
  23.  
  24. #include "bfd.h"
  25. #include "sysdep.h"
  26.  
  27. #include "ld.h"
  28. #include "config.h"
  29. #include "ldemul.h"
  30. #include "ldfile.h"
  31. #include "ldmisc.h"
  32.  
  33. extern  boolean lang_float_flag;
  34.  
  35.  
  36. extern enum bfd_architecture ldfile_output_architecture;
  37. extern unsigned long ldfile_output_machine;
  38. extern char *ldfile_output_machine_name;
  39.  
  40. extern bfd *output_bfd;
  41.  
  42.  
  43.  
  44. static void z8ksim_before_parse()
  45. {
  46.   ldfile_output_architecture = bfd_arch_z8k;
  47. }
  48.  
  49. static char *z8ksim_script =  
  50. #include "z8ksim.x"
  51. ;
  52. static char *z8ksim_script_option_Ur  =  
  53. #include "z8ksim.x"
  54. ;
  55. static char *z8ksim_script_option_r  =  
  56. #include "z8ksim.x"
  57. ;
  58.  
  59. static char *z8ksim_get_script()
  60. {                 
  61.   extern ld_config_type config;
  62.   if (config.relocateable_output == true &&
  63.       config.build_constructors == true) {
  64.     return z8ksim_script_option_Ur;
  65.   }
  66.   if (config.relocateable_output) {
  67.     return z8ksim_script_option_r;
  68.   }
  69.     
  70.   return z8ksim_script;
  71. }
  72. struct ld_emulation_xfer_struct ld_z8ksim_emulation = 
  73. {
  74.   z8ksim_before_parse,
  75.   syslib_default,
  76.   hll_default,
  77.   after_parse_default,
  78.   after_allocation_default,
  79.   set_output_arch_default,
  80.   ldemul_default_target,
  81.   before_allocation_default,
  82.   z8ksim_get_script,
  83.   "z8ksim"
  84. };
  85.