elf32-score.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. /* 32-bit ELF support for S+core.
  2. Copyright (C) 2009-2022 Free Software Foundation, Inc.
  3. Contributed by
  4. Brain.lin (brain.lin@sunplusct.com)
  5. Mei Ligang (ligang@sunnorth.com.cn)
  6. Pei-Lin Tsai (pltsai@sunplus.com)
  7. This file is part of BFD, the Binary File Descriptor library.
  8. This program 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 3 of the License, or
  11. (at your option) any later version.
  12. This program 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. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  19. MA 02110-1301, USA. */
  20. #include "elf/common.h"
  21. #include "elf/internal.h"
  22. extern void
  23. s7_bfd_score_elf_hide_symbol (struct bfd_link_info *,
  24. struct elf_link_hash_entry *,
  25. bool);
  26. extern bool
  27. s7_bfd_score_info_to_howto (bfd *, arelent *, Elf_Internal_Rela *);
  28. extern int
  29. s7_bfd_score_elf_relocate_section (bfd *,
  30. struct bfd_link_info *,
  31. bfd *,
  32. asection *,
  33. bfd_byte *,
  34. Elf_Internal_Rela *,
  35. Elf_Internal_Sym *,
  36. asection **);
  37. extern bool
  38. s7_bfd_score_elf_check_relocs (bfd *,
  39. struct bfd_link_info *,
  40. asection *,
  41. const Elf_Internal_Rela *);
  42. extern bool
  43. s7_bfd_score_elf_add_symbol_hook (bfd *,
  44. struct bfd_link_info *,
  45. Elf_Internal_Sym *,
  46. const char **,
  47. flagword *,
  48. asection **,
  49. bfd_vma *);
  50. extern void
  51. s7_bfd_score_elf_symbol_processing (bfd *, asymbol *);
  52. extern int
  53. s7_bfd_score_elf_link_output_symbol_hook (struct bfd_link_info *,
  54. const char *,
  55. Elf_Internal_Sym *,
  56. asection *,
  57. struct elf_link_hash_entry *);
  58. extern bool
  59. s7_bfd_score_elf_section_from_bfd_section (bfd *,
  60. asection *,
  61. int *);
  62. extern bool
  63. s7_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *,
  64. struct elf_link_hash_entry *);
  65. extern bool
  66. s7_bfd_score_elf_always_size_sections (bfd *, struct bfd_link_info *);
  67. extern bool
  68. s7_bfd_score_elf_size_dynamic_sections (bfd *, struct bfd_link_info *);
  69. extern bool
  70. s7_bfd_score_elf_create_dynamic_sections (bfd *, struct bfd_link_info *);
  71. extern bool
  72. s7_bfd_score_elf_finish_dynamic_symbol (bfd *,
  73. struct bfd_link_info *,
  74. struct elf_link_hash_entry *,
  75. Elf_Internal_Sym *);
  76. extern bool
  77. s7_bfd_score_elf_finish_dynamic_sections (bfd *, struct bfd_link_info *);
  78. extern bool
  79. s7_bfd_score_elf_fake_sections (bfd *,
  80. Elf_Internal_Shdr *,
  81. asection *);
  82. extern bool
  83. s7_bfd_score_elf_section_processing (bfd *, Elf_Internal_Shdr *);
  84. extern bool
  85. s7_bfd_score_elf_write_section (bfd *, asection *, bfd_byte *);
  86. extern void
  87. s7_bfd_score_elf_copy_indirect_symbol (struct bfd_link_info *,
  88. struct elf_link_hash_entry *,
  89. struct elf_link_hash_entry *);
  90. extern bool
  91. s7_bfd_score_elf_discard_info (bfd *, struct elf_reloc_cookie *,
  92. struct bfd_link_info *);
  93. extern bool
  94. s7_bfd_score_elf_ignore_discarded_relocs (asection *);
  95. extern asection *
  96. s7_bfd_score_elf_gc_mark_hook (asection *,
  97. struct bfd_link_info *,
  98. Elf_Internal_Rela *,
  99. struct elf_link_hash_entry *,
  100. Elf_Internal_Sym *);
  101. extern bool
  102. s7_bfd_score_elf_grok_prstatus (bfd *, Elf_Internal_Note *);
  103. extern bool
  104. s7_bfd_score_elf_grok_psinfo (bfd *, Elf_Internal_Note *);
  105. extern reloc_howto_type *
  106. s7_elf32_score_reloc_type_lookup (bfd *, bfd_reloc_code_real_type);
  107. extern struct bfd_link_hash_table *
  108. s7_elf32_score_link_hash_table_create (bfd *);
  109. extern bool
  110. s7_elf32_score_print_private_bfd_data (bfd *, void *);
  111. extern bool
  112. s7_elf32_score_merge_private_bfd_data (bfd *, struct bfd_link_info *);
  113. extern bool
  114. s7_elf32_score_new_section_hook (bfd *, asection *);
  115. extern bool
  116. _bfd_score_elf_common_definition (Elf_Internal_Sym *);
  117. #define elf_backend_common_definition _bfd_score_elf_common_definition