#define MY_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define MY_bfd_link_add_symbols _bfd_generic_link_add_symbols
+#define MY_final_link_callback unused
#define MY_bfd_final_link _bfd_generic_final_link
/* Until and unless we convert the slurp_reloc and slurp_symtab
#define MY_callback MY(callback)
+#define MY_exec_hdr_flags 0x2
+
#define NAME_swap_exec_header_in NAME(hp300hpux_32_,swap_exec_header_in)
#define HP_SYMTYPE_UNDEFINED 0x00
#define NAME(x,y) CAT3(hp300hpux,_32_,y)
#define ARCH_SIZE 32
+
+/* aoutx.h requires definitions for BMAGIC and QMAGIC. */
+#define BMAGIC 0415
+#define QMAGIC 0314
+
#include "aoutx.h"
/* Since the hpux symbol table has nlist elements interspersed with
#endif
if (adata (abfd).magic == undecided_magic)
- NAME (aout, adjust_sizes_and_vmas) (abfd, &text_size, &text_end);
+ NAME (aout,adjust_sizes_and_vmas) (abfd, &text_size, &text_end);
execp->a_syms = 0;
execp->a_entry = bfd_get_start_address (abfd);
obj_reloc_entry_size (abfd));
N_SET_MACHTYPE (*execp, 0xc);
- N_SET_FLAGS (*execp, 0x2);
+ N_SET_FLAGS (*execp, aout_backend_info (abfd)->exec_hdr_flags);
- NAME (aout, swap_exec_header_out) (abfd, execp, &exec_bytes);
+ NAME (aout,swap_exec_header_out) (abfd, execp, &exec_bytes);
/* update fields not covered by default swap_exec_header_out */
{
if (bfd_seek (abfd, (long) (N_TRELOFF (*execp)), false) != 0)
return false;
- if (!NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd)))
+ if (!NAME (aout,squirt_out_relocs) (abfd, obj_textsec (abfd)))
return false;
if (bfd_seek (abfd, (long) (N_DRELOFF (*execp)), false) != 0)
return false;
- if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd)))
+ if (!NAME (aout,squirt_out_relocs) (abfd, obj_datasec (abfd)))
return false;
}
*/
void
- NAME (aout, swap_exec_header_in) (abfd, raw_bytes, execp)
+NAME (aout,swap_exec_header_in) (abfd, raw_bytes, execp)
bfd *abfd;
struct external_exec *raw_bytes;
struct internal_exec *execp;
cache_save = *cache_ptr;
convert_sym_type (sym_pointer, cache_ptr, abfd);
- if (!translate_from_native_sym_flags (sym_pointer, cache_ptr, abfd))
+ if (!translate_from_native_sym_flags (abfd, cache_ptr))
return false;
/********************************************************/
strings += length + 10;
cache_ptr2->type &= ~HP_SECONDARY_SYMBOL; /* clear secondary */
convert_sym_type (sym_pointer, cache_ptr2, abfd);
- if (!translate_from_native_sym_flags (sym_pointer, cache_ptr2,
- abfd))
+ if (!translate_from_native_sym_flags (abfd, cache_ptr2))
return false;
}
reloc_cache = (arelent *) bfd_zalloc (abfd, (size_t) (count * sizeof
(arelent)));
- if (!reloc_cache)
+ if (!reloc_cache && count != 0)
{
nomem:
bfd_set_error (bfd_error_no_memory);
}
relocs = (PTR) bfd_alloc (abfd, reloc_size);
- if (!relocs)
+ if (!relocs && reloc_size != 0)
{
bfd_release (abfd, reloc_cache);
goto nomem;
else
{
tblptr = section->relocation;
- if (!tblptr)
- return -1;
for (count = 0; count++ < section->reloc_count;)
{