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

  1. /* ld.h -
  2.  
  3.    Copyright (C) 1991 Free Software Foundation, Inc.
  4.  
  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
  19.    the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  20.  
  21.  
  22. #define flag_is_not_at_end(x) ((x) & BSF_NOT_AT_END)
  23. #define flag_is_ordinary_local(x) (((x) & (BSF_LOCAL))&!((x) & (BSF_DEBUGGING)))
  24. #define flag_is_debugger(x) ((x) & BSF_DEBUGGING)
  25. #define flag_is_undefined_or_global(x) ((x) & (BSF_UNDEFINED | BSF_GLOBAL))
  26. #define flag_is_defined(x) (!((x) & (BSF_UNDEFINED)))
  27. #define flag_is_global_or_common(x) ((x) & (BSF_GLOBAL | BSF_FORT_COMM))
  28. #define flag_is_undefined_or_global_or_common(x) ((x) & (BSF_UNDEFINED | BSF_GLOBAL | BSF_FORT_COMM))
  29. #define flag_is_undefined_or_global_or_common_or_constructor(x) ((x) & (BSF_UNDEFINED | BSF_GLOBAL | BSF_FORT_COMM | BSF_CONSTRUCTOR))
  30. #define flag_is_constructor(x) ((x) & BSF_CONSTRUCTOR)
  31. #define flag_is_common(x) ((x) & BSF_FORT_COMM)
  32. #define flag_is_global(x) ((x) & (BSF_GLOBAL))
  33. #define flag_is_undefined(x) ((x) & BSF_UNDEFINED)
  34. #define flag_set(x,y) (x = y)
  35. #define flag_is_fort_comm(x) ((x) & BSF_FORT_COMM)
  36. #define flag_is_absolute(x) ((x) & BSF_ABSOLUTE)
  37. /* Extra information we hold on sections */
  38. typedef struct  user_section_struct {
  39.   /* Pointer to the section where this data will go */
  40.   struct lang_input_statement_struct *file;
  41. } section_userdata_type;
  42.  
  43.  
  44. #define get_userdata(x) ((x)->userdata)
  45. #define as_output_section_statement(x) ((x)->otheruserdata)
  46.  
  47.  
  48.  
  49. /* Which symbols should be stripped (omitted from the output):
  50.    none, all, or debugger symbols.  */
  51. typedef  enum { STRIP_NONE, STRIP_ALL, STRIP_DEBUGGER, STRIP_SOME } strip_symbols_type;
  52.  
  53.  
  54.  
  55.  
  56. /* Which local symbols should be omitted:
  57.    none, all, or those starting with L.
  58.    This is irrelevant if STRIP_NONE.  */
  59. typedef  enum { DISCARD_NONE, DISCARD_ALL, DISCARD_L } discard_locals_type;
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66. /* ALIGN macro changed to ALIGN_N to avoid    */
  67. /* conflict in /usr/include/machine/machparam.h */
  68. #define ALIGN_N(this, boundary)  ((( (this) + ((boundary) -1)) & (~((boundary)-1))))
  69.  
  70. typedef struct {
  71.   /* 1 => assign space to common symbols even if `relocatable_output'.  */
  72.   boolean force_common_definition;
  73.   boolean relax;
  74.   
  75. } args_type;
  76.  
  77. typedef int token_code_type;
  78.  
  79. typedef struct 
  80. {
  81.   bfd_size_type specified_data_size;
  82.   boolean magic_demand_paged;
  83.   boolean make_executable;
  84.   /* 1 => write relocation into output file so can re-input it later.  */
  85.   boolean relocateable_output;
  86.  
  87.   /* Will we build contstructors, or leave alone ? */
  88.   boolean build_constructors;
  89.   /* 1 => write relocation such that a UNIX linker can understand it.
  90.      This is used mainly to finish of sets that were built.  */
  91.   boolean unix_relocate;
  92.  
  93.   boolean sort_common;
  94. /* these flags may seem mutually exclusive, but not setting them
  95.    allows the back end to decide what would be the best thing to do */
  96.   boolean text_read_only;
  97.  
  98.    char *map_filename;
  99.    FILE *map_file;
  100.  
  101. } ld_config_type;
  102. #define set_asymbol_chain(x,y) ((x)->udata = (PTR)y)
  103. #define get_asymbol_chain(x) ((asymbol **)((x)->udata))
  104. #define get_loader_symbol(x) ((loader_global_asymbol *)((x)->udata))
  105. #define set_loader_symbol(x,y) ((x)->udata = (PTR)y)
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112. typedef enum {
  113.   lang_first_phase_enum,
  114.   lang_allocating_phase_enum,
  115.   lang_final_phase_enum } lang_phase_type;
  116.  
  117.  
  118.  
  119.  
  120.  
  121. int yyparse();
  122.