aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-x86.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elfxx-x86.h')
-rw-r--r--bfd/elfxx-x86.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/bfd/elfxx-x86.h b/bfd/elfxx-x86.h
index 7d23893..83f417a 100644
--- a/bfd/elfxx-x86.h
+++ b/bfd/elfxx-x86.h
@@ -30,6 +30,7 @@
#include "elf-linker-x86.h"
#include "elf/i386.h"
#include "elf/x86-64.h"
+#include "sframe-api.h"
#define X86_64_PCREL_TYPE_P(TYPE) \
((TYPE) == R_X86_64_PC8 \
@@ -105,6 +106,11 @@
|| (TYPE) == R_X86_64_PC32_BND \
|| (TYPE) == R_X86_64_PC64)
+/* This must be the same as sframe_get_hdr_size (sfh). For x86-64, this value
+ is the same as sizeof (sframe_header) because there is no SFrame auxilliary
+ header. */
+#define PLT_SFRAME_FDE_START_OFFSET sizeof (sframe_header)
+
#define ABI_64_P(abfd) \
(get_elf_backend_data (abfd)->s->elfclass == ELFCLASS64)
@@ -388,6 +394,24 @@ struct elf_x86_link_hash_entry
bfd_vma tlsdesc_got;
};
+#define SFRAME_PLT0_MAX_NUM_FRES 2
+#define SFRAME_PLTN_MAX_NUM_FRES 2
+
+struct elf_x86_sframe_plt
+{
+ unsigned int plt0_entry_size;
+ unsigned int plt0_num_fres;
+ const sframe_frame_row_entry *plt0_fres[SFRAME_PLT0_MAX_NUM_FRES];
+
+ unsigned int pltn_entry_size;
+ unsigned int pltn_num_fres;
+ const sframe_frame_row_entry *pltn_fres[SFRAME_PLTN_MAX_NUM_FRES];
+
+ unsigned int sec_pltn_entry_size;
+ unsigned int sec_pltn_num_fres;
+ const sframe_frame_row_entry *sec_pltn_fres[SFRAME_PLTN_MAX_NUM_FRES];
+};
+
struct elf_x86_lazy_plt_layout
{
/* The first entry in a lazy procedure linkage table looks like this. */
@@ -584,6 +608,11 @@ struct elf_x86_link_hash_table
asection *plt_got;
asection *plt_got_eh_frame;
+ sframe_encoder_ctx *plt_cfe_ctx;
+ asection *plt_sframe;
+ sframe_encoder_ctx *plt_second_cfe_ctx;
+ asection *plt_second_sframe;
+
/* Parameters describing PLT generation, lazy or non-lazy. */
struct elf_x86_plt_layout plt;
@@ -593,6 +622,10 @@ struct elf_x86_link_hash_table
/* Parameters describing non-lazy PLT generation. */
const struct elf_x86_non_lazy_plt_layout *non_lazy_plt;
+ /* The .sframe helper object for .plt section.
+ This is used for x86-64 only. */
+ const struct elf_x86_sframe_plt *sframe_plt;
+
union
{
bfd_signed_vma refcount;
@@ -682,6 +715,22 @@ struct elf_x86_init_table
/* The non-lazy PLT layout for IBT. */
const struct elf_x86_non_lazy_plt_layout *non_lazy_ibt_plt;
+ /* The .sframe helper object for lazy .plt section.
+ This is used for x86-64 only. */
+ const struct elf_x86_sframe_plt *sframe_lazy_plt;
+
+ /* The .sframe helper object for non-lazy .plt section.
+ This is used for x86-64 only. */
+ const struct elf_x86_sframe_plt *sframe_non_lazy_plt;
+
+ /* The .sframe helper object for lazy IBT .plt section.
+ This is used for x86-64 only. */
+ const struct elf_x86_sframe_plt *sframe_lazy_ibt_plt;
+
+ /* The .sframe helper object for non-lazy IBT .plt section.
+ This is used for x86-64 only. */
+ const struct elf_x86_sframe_plt *sframe_non_lazy_ibt_plt;
+
bfd_byte plt0_pad_byte;
bfd_vma (*r_info) (bfd_vma, bfd_vma);