ieee.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. /* IEEE Standard 695-1980 "Universal Format for Object Modules" header file
  2. Copyright (C) 2001-2015 Free Software Foundation, Inc.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 2, or (at your option)
  6. any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 51 Franklin Street - Fifth Floor,
  14. Boston, MA 02110-1301, USA.
  15. Contributed by Cygnus Support. */
  16. #define N_W_VARIABLES 8
  17. #define Module_Beginning 0xe0
  18. typedef struct ieee_module
  19. {
  20. char *processor;
  21. char *module_name;
  22. }
  23. ieee_module_begin_type;
  24. #define Address_Descriptor 0xec
  25. typedef struct ieee_address
  26. {
  27. bfd_vma number_of_bits_mau;
  28. bfd_vma number_of_maus_in_address;
  29. unsigned char byte_order;
  30. #define IEEE_LITTLE 0xcc
  31. #define IEEE_BIG 0xcd
  32. }
  33. ieee_address_descriptor_type;
  34. typedef union ieee_w_variable
  35. {
  36. file_ptr offset[N_W_VARIABLES];
  37. struct
  38. {
  39. file_ptr extension_record;
  40. file_ptr environmental_record;
  41. file_ptr section_part;
  42. file_ptr external_part;
  43. file_ptr debug_information_part;
  44. file_ptr data_part;
  45. file_ptr trailer_part;
  46. file_ptr me_record;
  47. }
  48. r;
  49. }
  50. ieee_w_variable_type;
  51. typedef enum ieee_record
  52. {
  53. ieee_number_start_enum = 0x00,
  54. ieee_number_end_enum=0x7f,
  55. ieee_number_repeat_start_enum = 0x80,
  56. ieee_number_repeat_end_enum = 0x88,
  57. ieee_number_repeat_4_enum = 0x84,
  58. ieee_number_repeat_3_enum = 0x83,
  59. ieee_number_repeat_2_enum = 0x82,
  60. ieee_number_repeat_1_enum = 0x81,
  61. ieee_module_beginning_enum = 0xe0,
  62. ieee_module_end_enum = 0xe1,
  63. ieee_extension_length_1_enum = 0xde,
  64. ieee_extension_length_2_enum = 0xdf,
  65. ieee_section_type_enum = 0xe6,
  66. ieee_section_alignment_enum = 0xe7,
  67. ieee_external_symbol_enum = 0xe8,
  68. ieee_comma = 0x90,
  69. ieee_external_reference_enum = 0xe9,
  70. ieee_set_current_section_enum = 0xe5,
  71. ieee_address_descriptor_enum = 0xec,
  72. ieee_load_constant_bytes_enum = 0xed,
  73. ieee_load_with_relocation_enum = 0xe4,
  74. ieee_variable_A_enum = 0xc1,
  75. ieee_variable_B_enum = 0xc2,
  76. ieee_variable_C_enum = 0xc3,
  77. ieee_variable_D_enum = 0xc4,
  78. ieee_variable_E_enum = 0xc5,
  79. ieee_variable_F_enum = 0xc6,
  80. ieee_variable_G_enum = 0xc7,
  81. ieee_variable_H_enum = 0xc8,
  82. ieee_variable_I_enum = 0xc9,
  83. ieee_variable_J_enum = 0xca,
  84. ieee_variable_K_enum = 0xcb,
  85. ieee_variable_L_enum = 0xcc,
  86. ieee_variable_M_enum = 0xcd,
  87. ieee_variable_N_enum = 0xce,
  88. ieee_variable_O_enum = 0xcf,
  89. ieee_variable_P_enum = 0xd0,
  90. ieee_variable_Q_enum = 0xd1,
  91. ieee_variable_R_enum = 0xd2,
  92. ieee_variable_S_enum = 0xd3,
  93. ieee_variable_T_enum = 0xd4,
  94. ieee_variable_U_enum = 0xd5,
  95. ieee_variable_V_enum = 0xd6,
  96. ieee_variable_W_enum = 0xd7,
  97. ieee_variable_X_enum = 0xd8,
  98. ieee_variable_Y_enum = 0xd9,
  99. ieee_variable_Z_enum = 0xda,
  100. ieee_function_plus_enum = 0xa5,
  101. ieee_function_minus_enum = 0xa6,
  102. ieee_function_signed_open_b_enum = 0xba,
  103. ieee_function_signed_close_b_enum = 0xbb,
  104. ieee_function_unsigned_open_b_enum = 0xbc,
  105. ieee_function_unsigned_close_b_enum = 0xbd,
  106. ieee_function_either_open_b_enum = 0xbe,
  107. ieee_function_either_close_b_enum = 0xbf,
  108. ieee_record_seperator_enum = 0xdb,
  109. ieee_e2_first_byte_enum = 0xe2,
  110. ieee_section_size_enum = 0xe2d3,
  111. ieee_physical_region_size_enum = 0xe2c1,
  112. ieee_region_base_address_enum = 0xe2c2,
  113. ieee_mau_size_enum = 0xe2c6,
  114. ieee_m_value_enum = 0xe2cd,
  115. ieee_section_base_address_enum = 0xe2cc,
  116. ieee_asn_record_enum = 0xe2ce,
  117. ieee_section_offset_enum = 0xe2d2,
  118. ieee_value_starting_address_enum = 0xe2c7,
  119. ieee_assign_value_to_variable_enum = 0xe2d7,
  120. ieee_set_current_pc_enum = 0xe2d0,
  121. ieee_value_record_enum = 0xe2c9,
  122. ieee_nn_record = 0xf0,
  123. ieee_at_record_enum = 0xf1,
  124. ieee_ty_record_enum = 0xf2,
  125. ieee_attribute_record_enum = 0xf1c9,
  126. ieee_atn_record_enum = 0xf1ce,
  127. ieee_external_reference_info_record_enum = 0xf1d8,
  128. ieee_weak_external_reference_enum= 0xf4,
  129. ieee_repeat_data_enum = 0xf7,
  130. ieee_bb_record_enum = 0xf8,
  131. ieee_be_record_enum = 0xf9
  132. }
  133. ieee_record_enum_type;
  134. typedef struct ieee_section
  135. {
  136. unsigned int section_index;
  137. unsigned int section_type;
  138. char * section_name;
  139. unsigned int parent_section_index;
  140. unsigned int sibling_section_index;
  141. unsigned int context_index;
  142. }
  143. ieee_section_type;
  144. #define IEEE_REFERENCE_BASE 11
  145. #define IEEE_PUBLIC_BASE 32
  146. #define IEEE_SECTION_NUMBER_BASE 1