summaryrefslogtreecommitdiff
path: root/bfd/mach-o-x86-64.c
diff options
context:
space:
mode:
authoriains <iains>2012-02-10 11:07:33 +0000
committeriains <iains>2012-02-10 11:07:33 +0000
commiteb616f8f3517e47259cbc213b664750795ad6a05 (patch)
tree2732bcd11d41ce38b0dd0bc6af269bdc9045de6e /bfd/mach-o-x86-64.c
parent3316705c1e939076ce9893575e8648ce5c93e838 (diff)
downloadbinutils-redhat-eb616f8f3517e47259cbc213b664750795ad6a05.tar.gz
correct some mach-o section specification nits.
bfd: * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section parameters. * mach-o-x86-64.c (text_section_names_xlat): New. (mach_o_x86_64_segsec_names_xlat): New. (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat. * mach-o-i386.c (text_section_names_xlat): Correct section parameters.
Diffstat (limited to 'bfd/mach-o-x86-64.c')
-rw-r--r--bfd/mach-o-x86-64.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/bfd/mach-o-x86-64.c b/bfd/mach-o-x86-64.c
index 48e51e206e..232701e867 100644
--- a/bfd/mach-o-x86-64.c
+++ b/bfd/mach-o-x86-64.c
@@ -326,13 +326,30 @@ bfd_mach_o_section_type_valid_for_x86_64 (unsigned long val)
return TRUE;
}
+/* We want to bump the alignment of some sections. */
+static const mach_o_section_name_xlat text_section_names_xlat[] =
+ {
+ { ".eh_frame", "__eh_frame",
+ SEC_READONLY | SEC_DATA | SEC_LOAD, BFD_MACH_O_S_COALESCED,
+ BFD_MACH_O_S_ATTR_LIVE_SUPPORT
+ | BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS
+ | BFD_MACH_O_S_ATTR_NO_TOC, 3},
+ { NULL, NULL, 0, 0, 0, 0}
+ };
+
+const mach_o_segment_name_xlat mach_o_x86_64_segsec_names_xlat[] =
+ {
+ { "__TEXT", text_section_names_xlat },
+ { NULL, NULL }
+ };
+
#define bfd_mach_o_swap_reloc_in bfd_mach_o_x86_64_swap_reloc_in
#define bfd_mach_o_swap_reloc_out bfd_mach_o_x86_64_swap_reloc_out
#define bfd_mach_o_bfd_reloc_type_lookup bfd_mach_o_x86_64_bfd_reloc_type_lookup
#define bfd_mach_o_bfd_reloc_name_lookup bfd_mach_o_x86_64_bfd_reloc_name_lookup
#define bfd_mach_o_print_thread NULL
-#define bfd_mach_o_tgt_seg_table NULL
+#define bfd_mach_o_tgt_seg_table mach_o_x86_64_segsec_names_xlat
#define bfd_mach_o_section_type_valid_for_tgt bfd_mach_o_section_type_valid_for_x86_64
#define TARGET_NAME mach_o_x86_64_vec