#include "mach-o/reloc.h"
#define bfd_mach_o_object_p bfd_mach_o_i386_object_p
#define bfd_mach_o_core_p bfd_mach_o_i386_core_p
#define bfd_mach_o_mkobject bfd_mach_o_i386_mkobject
#include "mach-o/reloc.h"
#define bfd_mach_o_object_p bfd_mach_o_i386_object_p
#define bfd_mach_o_core_p bfd_mach_o_i386_core_p
#define bfd_mach_o_mkobject bfd_mach_o_i386_mkobject
bfd_mach_o_i386_object_p (bfd *abfd)
{
return bfd_mach_o_header_p (abfd, 0, 0, BFD_MACH_O_CPU_TYPE_I386);
}
bfd_mach_o_i386_object_p (bfd *abfd)
{
return bfd_mach_o_header_p (abfd, 0, 0, BFD_MACH_O_CPU_TYPE_I386);
}
bfd_mach_o_i386_core_p (bfd *abfd)
{
return bfd_mach_o_header_p (abfd, 0,
bfd_mach_o_i386_core_p (bfd *abfd)
{
return bfd_mach_o_header_p (abfd, 0,
- {
- case BFD_MACH_O_GENERIC_RELOC_VANILLA:
- switch ((reloc.r_length << 1) | reloc.r_pcrel)
- {
- case 0: /* len = 0, pcrel = 0 */
- res->howto = &i386_howto_table[2];
- return TRUE;
- case 2: /* len = 1, pcrel = 0 */
- res->howto = &i386_howto_table[1];
- return TRUE;
- case 3: /* len = 1, pcrel = 1 */
- res->howto = &i386_howto_table[4];
- return TRUE;
- case 4: /* len = 2, pcrel = 0 */
- res->howto = &i386_howto_table[0];
- return TRUE;
- case 5: /* len = 2, pcrel = 1 */
- res->howto = &i386_howto_table[3];
- return TRUE;
- default:
- return FALSE;
- }
- default:
- break;
- }
+ {
+ case BFD_MACH_O_GENERIC_RELOC_VANILLA:
+ switch ((reloc.r_length << 1) | reloc.r_pcrel)
+ {
+ case 0: /* len = 0, pcrel = 0 */
+ res->howto = &i386_howto_table[2];
+ return TRUE;
+ case 2: /* len = 1, pcrel = 0 */
+ res->howto = &i386_howto_table[1];
+ return TRUE;
+ case 3: /* len = 1, pcrel = 1 */
+ res->howto = &i386_howto_table[4];
+ return TRUE;
+ case 4: /* len = 2, pcrel = 0 */
+ res->howto = &i386_howto_table[0];
+ return TRUE;
+ case 5: /* len = 2, pcrel = 1 */
+ res->howto = &i386_howto_table[3];
+ return TRUE;
+ default:
+ return FALSE;
+ }
+ default:
+ break;
+ }
rinfo->r_pcrel = rel->howto->pc_relative;
rinfo->r_length = rel->howto->size; /* Correct in practice. */
if ((*rel->sym_ptr_ptr)->flags & BSF_SECTION_SYM)
rinfo->r_pcrel = rel->howto->pc_relative;
rinfo->r_length = rel->howto->size; /* Correct in practice. */
if ((*rel->sym_ptr_ptr)->flags & BSF_SECTION_SYM)
static reloc_howto_type *
bfd_mach_o_i386_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
static reloc_howto_type *
bfd_mach_o_i386_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
static reloc_howto_type *
bfd_mach_o_i386_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
static reloc_howto_type *
bfd_mach_o_i386_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
fprintf (file, " x86_THREAD_STATE:\n");
fprintf (file, " flavor: 0x%08lx count: 0x%08lx\n",
fprintf (file, " x86_THREAD_STATE:\n");
fprintf (file, " flavor: 0x%08lx count: 0x%08lx\n",
- (unsigned long)bfd_get_32 (abfd, buf + 0),
- (unsigned long)bfd_get_32 (abfd, buf + 4));
+ (unsigned long)bfd_get_32 (abfd, buf + 0),
+ (unsigned long)bfd_get_32 (abfd, buf + 4));
- (unsigned long)bfd_get_32 (abfd, buf + 8),
- (unsigned long)bfd_get_32 (abfd, buf + 12),
- (unsigned long)bfd_get_32 (abfd, buf + 16),
- (unsigned long)bfd_get_32 (abfd, buf + 20));
+ (unsigned long)bfd_get_32 (abfd, buf + 8),
+ (unsigned long)bfd_get_32 (abfd, buf + 12),
+ (unsigned long)bfd_get_32 (abfd, buf + 16),
+ (unsigned long)bfd_get_32 (abfd, buf + 20));
- (unsigned long)bfd_get_32 (abfd, buf + 24),
- (unsigned long)bfd_get_32 (abfd, buf + 28),
- (unsigned long)bfd_get_32 (abfd, buf + 32),
- (unsigned long)bfd_get_32 (abfd, buf + 36));
+ (unsigned long)bfd_get_32 (abfd, buf + 24),
+ (unsigned long)bfd_get_32 (abfd, buf + 28),
+ (unsigned long)bfd_get_32 (abfd, buf + 32),
+ (unsigned long)bfd_get_32 (abfd, buf + 36));
- (unsigned long)bfd_get_32 (abfd, buf + 40),
- (unsigned long)bfd_get_32 (abfd, buf + 44),
- (unsigned long)bfd_get_32 (abfd, buf + 48),
- (unsigned long)bfd_get_32 (abfd, buf + 52));
+ (unsigned long)bfd_get_32 (abfd, buf + 40),
+ (unsigned long)bfd_get_32 (abfd, buf + 44),
+ (unsigned long)bfd_get_32 (abfd, buf + 48),
+ (unsigned long)bfd_get_32 (abfd, buf + 52));
- (unsigned long)bfd_get_32 (abfd, buf + 56),
- (unsigned long)bfd_get_32 (abfd, buf + 60),
- (unsigned long)bfd_get_32 (abfd, buf + 64),
- (unsigned long)bfd_get_32 (abfd, buf + 68));
+ (unsigned long)bfd_get_32 (abfd, buf + 56),
+ (unsigned long)bfd_get_32 (abfd, buf + 60),
+ (unsigned long)bfd_get_32 (abfd, buf + 64),
+ (unsigned long)bfd_get_32 (abfd, buf + 68));
fprintf (file, " x86_FLOAT_STATE:\n");
fprintf (file, " flavor: 0x%08lx count: 0x%08lx\n",
fprintf (file, " x86_FLOAT_STATE:\n");
fprintf (file, " flavor: 0x%08lx count: 0x%08lx\n",
- (unsigned long)bfd_get_32 (abfd, buf + 0),
- (unsigned long)bfd_get_32 (abfd, buf + 4));
+ (unsigned long)bfd_get_32 (abfd, buf + 0),
+ (unsigned long)bfd_get_32 (abfd, buf + 4));
fprintf (file, " x86_EXCEPTION_STATE:\n");
fprintf (file, " flavor: 0x%08lx count: 0x%08lx\n",
fprintf (file, " x86_EXCEPTION_STATE:\n");
fprintf (file, " flavor: 0x%08lx count: 0x%08lx\n",
- (unsigned long)bfd_get_32 (abfd, buf + 0),
- (unsigned long)bfd_get_32 (abfd, buf + 4));
+ (unsigned long)bfd_get_32 (abfd, buf + 0),
+ (unsigned long)bfd_get_32 (abfd, buf + 4));
- (unsigned long)bfd_get_32 (abfd, buf + 8),
- (unsigned long)bfd_get_32 (abfd, buf + 12),
- (unsigned long)bfd_get_32 (abfd, buf + 16));
+ (unsigned long)bfd_get_32 (abfd, buf + 8),
+ (unsigned long)bfd_get_32 (abfd, buf + 12),
+ (unsigned long)bfd_get_32 (abfd, buf + 16));
-#define bfd_mach_o_swap_reloc_out bfd_mach_o_i386_swap_reloc_out
-#define bfd_mach_o_print_thread bfd_mach_o_i386_print_thread
+#define bfd_mach_o_swap_reloc_out bfd_mach_o_i386_swap_reloc_out
+#define bfd_mach_o_print_thread bfd_mach_o_i386_print_thread
#define bfd_mach_o_tgt_seg_table mach_o_i386_segsec_names_xlat
#define bfd_mach_o_section_type_valid_for_tgt NULL
#define bfd_mach_o_tgt_seg_table mach_o_i386_segsec_names_xlat
#define bfd_mach_o_section_type_valid_for_tgt NULL
#define bfd_mach_o_bfd_reloc_type_lookup bfd_mach_o_i386_bfd_reloc_type_lookup
#define bfd_mach_o_bfd_reloc_name_lookup bfd_mach_o_i386_bfd_reloc_name_lookup
#define bfd_mach_o_bfd_reloc_type_lookup bfd_mach_o_i386_bfd_reloc_type_lookup
#define bfd_mach_o_bfd_reloc_name_lookup bfd_mach_o_i386_bfd_reloc_name_lookup