lst.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /* SOM lst definitions for BFD.
  2. Copyright (C) 2010-2015 Free Software Foundation, Inc.
  3. Contributed by Tristan Gingold <gingold@adacore.com>, AdaCore.
  4. This file is part of BFD, the Binary File Descriptor library.
  5. This program 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 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software Foundation,
  15. Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
  16. #ifndef _SOM_LST_H
  17. #define _SOM_LST_H
  18. #include "clock.h"
  19. /* See 4.2 Libraray Symbol Table Header Record. */
  20. struct som_external_lst_header
  21. {
  22. unsigned char system_id[2];
  23. unsigned char a_magic[2];
  24. unsigned char version_id[4];
  25. struct som_external_clock file_time;
  26. unsigned char hash_loc[4];
  27. unsigned char hash_size[4];
  28. unsigned char module_count[4];
  29. unsigned char module_limit[4];
  30. unsigned char dir_loc[4];
  31. unsigned char export_loc[4];
  32. unsigned char export_count[4];
  33. unsigned char import_loc[4];
  34. unsigned char aux_loc[4];
  35. unsigned char aux_size[4];
  36. unsigned char string_loc[4];
  37. unsigned char string_size[4];
  38. unsigned char free_list[4];
  39. unsigned char file_end[4];
  40. unsigned char checksum[4];
  41. };
  42. #define VERSION_ID 85082112
  43. #define LIBMAGIC 0x0619
  44. #define LIBMAGIC_EXEC 0x0104
  45. struct som_external_lst_symbol_record
  46. {
  47. unsigned char flags[4];
  48. unsigned char name[4];
  49. unsigned char qualifier_name[4];
  50. unsigned char symbol_info[4];
  51. unsigned char symbol_value[4];
  52. unsigned char symbol_descriptor[4];
  53. unsigned char reserved;
  54. unsigned char max_num_args;
  55. unsigned char min_num_args;
  56. unsigned char num_args;
  57. unsigned char som_index[4];
  58. unsigned char symbol_key[4];
  59. unsigned char next_entry[4];
  60. };
  61. /* Fields of flags. */
  62. #define LST_SYMBOL_HIDDEN (1 << 31)
  63. #define LST_SYMBOL_SECONDARY_DEF (1 << 30)
  64. #define LST_SYMBOL_SYMBOL_TYPE_SH 24
  65. #define LST_SYMBOL_SYMBOL_SCOPE_SH 20
  66. #define LST_SYMBOL_CHECK_LEVEL_SH 17
  67. #define LST_SYMBOL_MUST_QUALIFY (1 << 16)
  68. #define LST_SYMBOL_INITIALY_FROZEN (1 << 15)
  69. #define LST_SYMBOL_MEMORY_RESIDENT (1 << 14)
  70. #define LST_SYMBOL_IS_COMMON (1 << 13)
  71. #define LST_SYMBOL_DUP_COMMON (1 << 12)
  72. #define LST_SYMBOL_XLEAST_SH 10
  73. #define LST_SYMBOL_ARG_RELOC_SH 0
  74. /* According to 4.3.2 SOM Directory. */
  75. struct som_external_som_entry
  76. {
  77. unsigned char location[4];
  78. unsigned char length[4];
  79. };
  80. #endif /* _SOM_LST_H */