/* BFD semi-generic back-end for a.out binaries.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
Written by Cygnus Support.
#define MY_swap_std_reloc_in NAME(aout,swap_std_reloc_in)
#endif
+#ifndef MY_swap_ext_reloc_in
+#define MY_swap_ext_reloc_in NAME(aout,swap_ext_reloc_in)
+#endif
+
#ifndef MY_swap_std_reloc_out
#define MY_swap_std_reloc_out NAME(aout,swap_std_reloc_out)
#endif
+#ifndef MY_swap_ext_reloc_out
+#define MY_swap_ext_reloc_out NAME(aout,swap_ext_reloc_out)
+#endif
+
#ifndef MY_final_link_relocate
#define MY_final_link_relocate _bfd_final_link_relocate
#endif
HOWTO( 8, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"GOT_REL", false, 0,0x00000000, false),
HOWTO( 9, 0, 1, 16, false, 0, complain_overflow_bitfield,0,"BASE16", false,0xffffffff,0xffffffff, false),
HOWTO(10, 0, 2, 32, false, 0, complain_overflow_bitfield,0,"BASE32", false,0xffffffff,0xffffffff, false),
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
HOWTO(16, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"JMP_TABLE", false, 0,0x00000000, false),
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 }, { -1 },
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
HOWTO(32, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"RELATIVE", false, 0,0x00000000, false),
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
-{ -1 },
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
+EMPTY_HOWTO (-1),
HOWTO(40, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"BASEREL", false, 0,0x00000000, false),
};
if (ext)
switch (code)
{
+ EXT (BFD_RELOC_8, 0);
+ EXT (BFD_RELOC_16, 1);
EXT (BFD_RELOC_32, 2);
EXT (BFD_RELOC_HI22, 8);
EXT (BFD_RELOC_LO10, 11);
NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
bfd *abfd;
bfd_size_type *text_size;
- file_ptr *text_end;
+ file_ptr *text_end ATTRIBUTE_UNUSED;
{
struct internal_exec *execp = exec_hdr (abfd);
(struct reloc_ext_external *) relocs;
for (; counter < count; counter++, rptr++, cache_ptr++)
- NAME(aout,swap_ext_reloc_in) (abfd, rptr, cache_ptr, symbols,
- bfd_get_symcount (abfd));
+ MY_swap_ext_reloc_in (abfd, rptr, cache_ptr, symbols,
+ bfd_get_symcount (abfd));
}
else
{
for (natptr = native;
count != 0;
--count, natptr += each_size, ++generic)
- NAME(aout,swap_ext_reloc_out) (abfd, *generic, (struct reloc_ext_external *)natptr);
+ MY_swap_ext_reloc_out (abfd, *generic,
+ (struct reloc_ext_external *) natptr);
}
else
{
/*ARGSUSED*/
alent *
NAME(aout,get_lineno) (ignore_abfd, ignore_symbol)
- bfd *ignore_abfd;
- asymbol *ignore_symbol;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
+ asymbol *ignore_symbol ATTRIBUTE_UNUSED;
{
-return (alent *)NULL;
+ return (alent *)NULL;
}
/*ARGSUSED*/
void
NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol;
symbol_info *ret;
{
/*ARGSUSED*/
void
NAME(aout,print_symbol) (ignore_abfd, afile, symbol, how)
- bfd *ignore_abfd;
+ bfd *ignore_abfd ATTRIBUTE_UNUSED;
PTR afile;
asymbol *symbol;
bfd_print_symbol_type how;
}
if (main_file_name == NULL
- || main_file_name[0] == '/'
+ || IS_ABSOLUTE_PATH (main_file_name)
|| directory_name == NULL)
filelen = 0;
else
if (main_file_name != NULL)
{
- if (main_file_name[0] == '/' || directory_name == NULL)
+ if (IS_ABSOLUTE_PATH (main_file_name) || directory_name == NULL)
*filename_ptr = main_file_name;
else
{
int
NAME(aout,sizeof_headers) (abfd, execable)
bfd *abfd;
- boolean execable;
+ boolean execable ATTRIBUTE_UNUSED;
{
return adata(abfd).exec_bytes_size;
}
default:
abort ();
}
+ /*NOTREACHED*/
+ return NULL;
}
/* Relocate an a.out section using standard a.out relocs. */
else
name = strings + GET_WORD (input_bfd, syms[r_index].e_strx);
if (! ((*finfo->info->callbacks->undefined_symbol)
- (finfo->info, name, input_bfd, input_section, r_addr)))
+ (finfo->info, name, input_bfd, input_section,
+ r_addr, true)))
return false;
}
else
name = strings + GET_WORD (input_bfd, syms[r_index].e_strx);
if (! ((*finfo->info->callbacks->undefined_symbol)
- (finfo->info, name, input_bfd, input_section, r_addr)))
+ (finfo->info, name, input_bfd, input_section,
+ r_addr, true)))
return false;
}
int r_index;
int r_extern;
reloc_howto_type *howto;
- file_ptr *reloff_ptr;
+ file_ptr *reloff_ptr = NULL;
struct reloc_std_external srel;
struct reloc_ext_external erel;
PTR rel_ptr;
}
else
{
+#ifdef MY_put_ext_reloc
+ MY_put_ext_reloc (finfo->output_bfd, r_extern, r_index, p->offset,
+ howto, &erel, pr->addend);
+#else
PUT_WORD (finfo->output_bfd, p->offset, erel.r_address);
if (bfd_header_big_endian (finfo->output_bfd))
}
PUT_WORD (finfo->output_bfd, pr->addend, erel.r_addend);
+#endif /* MY_put_ext_reloc */
rel_ptr = (PTR) &erel;
}