elf32-ppc.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* PowerPC-specific support for 64-bit ELF.
  2. Copyright (C) 2003-2022 Free Software Foundation, Inc.
  3. This file is part of BFD, the Binary File Descriptor library.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  15. MA 02110-1301, USA. */
  16. enum ppc_elf_plt_type
  17. {
  18. PLT_UNSET,
  19. PLT_OLD,
  20. PLT_NEW,
  21. PLT_VXWORKS
  22. };
  23. /* Various options passed from the linker to bfd backend. */
  24. struct ppc_elf_params
  25. {
  26. /* Chooses the type of .plt. */
  27. enum ppc_elf_plt_type plt_style;
  28. /* Set if individual PLT call stubs should be aligned. */
  29. int plt_stub_align;
  30. /* Whether to emit symbols for stubs. */
  31. int emit_stub_syms;
  32. /* Whether to emit special stub for __tls_get_addr calls. */
  33. int no_tls_get_addr_opt;
  34. /* Insert trampolines for branches that won't reach their destination. */
  35. int branch_trampolines;
  36. /* Avoid execution falling into new page. */
  37. int ppc476_workaround;
  38. unsigned int pagesize_p2;
  39. /* The bfd backend detected a non-PIC reference to a protected symbol
  40. defined in a shared library. */
  41. int pic_fixup;
  42. /* Relocate 16A relocs as 16D and vice versa. */
  43. int vle_reloc_fixup;
  44. bfd_vma pagesize;
  45. };
  46. void ppc_elf_link_params (struct bfd_link_info *, struct ppc_elf_params *);
  47. int ppc_elf_select_plt_layout (bfd *, struct bfd_link_info *);
  48. bool ppc_elf_inline_plt (struct bfd_link_info *);
  49. asection *ppc_elf_tls_setup (bfd *, struct bfd_link_info *);
  50. bool ppc_elf_tls_optimize (bfd *, struct bfd_link_info *);
  51. void ppc_elf_maybe_strip_sdata_syms (struct bfd_link_info *);
  52. extern bool ppc_elf_modify_segment_map (bfd *, struct bfd_link_info *);
  53. extern bool ppc_elf_section_processing (bfd *, Elf_Internal_Shdr *);
  54. extern bool ppc_finish_symbols (struct bfd_link_info *);