From 522e0ead63af9429fce9cf7678df52a625d76228 Mon Sep 17 00:00:00 2001 From: Steve Chamberlain Date: Mon, 4 Nov 1991 00:35:19 +0000 Subject: [PATCH] Sat Nov 2 14:26:03 1991 Steve Chamberlain (steve at cygnus.com) * Makefile.in: Added ctor.c * archures.c (bfd_default_arch_struct) added bfd_default_reloc_type_lookup. * coffcode.h: removed a load of #if 0ed code. (coff_compute_file_section_positions): now works out the section alignment and size correctly in all cases. (coff_get_symtab): looks for contructor symbols and calls the right function when they're found. (coff_canonicalize_reloc): knows when a section is full of contructors and does the right thing. * cpu-m88k.c: Added default_reloc_type lookup to the architecture description. * libbfd-in.h: (bfd_default_reloc_type_lookup) defun added. * libcoff.h: removed #if 0ed code * reloc.c: (bfd_reloc_code_real_type) added BFD_RELOC_CTOR for arch independent contructtor relocation type. (bfd_reloc_type_lookup): removed the comment "this will go away" since it won't. (bfd_howto_32): stolen from 88k, this is a 32bit reloc which is used when BFD_RELOC_CTOR falls through to give a default 32bit reloc for contructors. (bfd_default_reloc_type_lookup): added. * aoutf1.h: fixed SEGMENT_SIZE typo. --- bfd/ChangeLog | 25 +++++++++++++++++++++++++ bfd/aoutf1.h | 38 +++++++++++++++++++++++++++++++++++--- bfd/ctor.c | 2 +- 3 files changed, 61 insertions(+), 4 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 115e6c68615..14241af3a5c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -12,6 +12,31 @@ Sun Nov 3 12:07:08 1991 Per Bothner (bothner at cygnus.com) * syms.c: New function bfd_decode_symclass, used by nm printer. New function bfd_stab_name to look up string name of stab code. +Sat Nov 2 14:26:03 1991 Steve Chamberlain (steve at cygnus.com) + + * Makefile.in: Added ctor.c + * archures.c (bfd_default_arch_struct) added + bfd_default_reloc_type_lookup. + * coffcode.h: removed a load of #if 0ed code. + (coff_compute_file_section_positions): now works out the section + alignment and size correctly in all cases. + (coff_get_symtab): looks for contructor symbols and calls the + right function when they're found. (coff_canonicalize_reloc): + knows when a section is full of contructors and does the right + thing. + * cpu-m88k.c: Added default_reloc_type lookup to the architecture + description. + * libbfd-in.h: (bfd_default_reloc_type_lookup) defun added. + * libcoff.h: removed #if 0ed code + * reloc.c: (bfd_reloc_code_real_type) added BFD_RELOC_CTOR for + arch independent contructtor relocation type. + (bfd_reloc_type_lookup): removed the comment "this will go away" + since it won't. (bfd_howto_32): stolen from 88k, this is a 32bit + reloc which is used when BFD_RELOC_CTOR falls through to give a + default 32bit reloc for contructors. + (bfd_default_reloc_type_lookup): added. + * aoutf1.h: fixed SEGMENT_SIZE typo. + Thu Oct 31 18:23:06 1991 John Gilmore (gnu at cygnus.com) * coff-rs6000.c: Change name to "aixcoff-rs6000", to avoid diff --git a/bfd/aoutf1.h b/bfd/aoutf1.h index 622611c8ea4..d6f28a3fc95 100644 --- a/bfd/aoutf1.h +++ b/bfd/aoutf1.h @@ -106,6 +106,7 @@ sunos4_callback (abfd) struct internal_exec *execp = exec_hdr (abfd); enum bfd_architecture arch; long machine; + WORK_OUT_FILE_POSITIONS(abfd, execp); /* Determine the architecture and machine type of the object file. */ @@ -117,11 +118,13 @@ sunos4_callback (abfd) break; case M_68010: + case M_HP200: arch = bfd_arch_m68k; machine = 68010; break; case M_68020: + case M_HP300: arch = bfd_arch_m68k; machine = 68020; break; @@ -141,6 +144,11 @@ sunos4_callback (abfd) machine = 0; break; + case M_HPUX: + arch = bfd_arch_m68k; + machine = 0; + break; + default: arch = bfd_arch_obscure; machine = 0; @@ -148,10 +156,34 @@ sunos4_callback (abfd) } bfd_set_arch_mach(abfd, arch, machine); choose_reloc_size(abfd); + adata(abfd)->page_size = PAGE_SIZE; +#ifdef SEGMENT_SIZE + adata(abfd)->segment_size = SEGMENT_SIZE; +#else + adata(abfd)->segment_size = PAGE_SIZE; +#endif + adata(abfd)->exec_bytes_size = EXEC_BYTES_SIZE; + return abfd->xvec; } +static boolean +DEFUN(sunos_mkobject,(abfd), + bfd *abfd) +{ + if (NAME(aout,mkobject)(abfd) == false) + return false; + adata(abfd)->page_size = PAGE_SIZE; +#ifdef SEGMENT_SIZE + adata(abfd)->page_size = SEGMENT_SIZE; +#else + adata(abfd)->segment_size = PAGE_SIZE; +#endif + adata(abfd)->exec_bytes_size = EXEC_BYTES_SIZE; + return true; +} + /* Write an object file in SunOS format. Section contents have already been written. We write the file header, symbols, and relocation. */ @@ -495,8 +527,8 @@ DEFUN(sunos4_core_file_p,(abfd), core_stacksec (abfd)->vma = (core->c_stacktop - core->c_ssize); core_datasec (abfd)->vma = N_DATADDR(core->c_aouthdr); - core_regsec (abfd)->vma = -1; - core_reg2sec (abfd)->vma = -1; + core_regsec (abfd)->vma = 0; + core_reg2sec (abfd)->vma = 0; core_stacksec (abfd)->filepos = core->c_len + core->c_dsize; core_datasec (abfd)->filepos = core->c_len; @@ -606,7 +638,7 @@ bfd_target VECNAME = {_bfd_dummy_target, NAME(sunos,object_p), bfd_generic_archive_p, sunos4_core_file_p}, - {bfd_false, NAME(aout,mkobject), + {bfd_false, sunos_mkobject, _bfd_generic_mkarchive, bfd_false}, {bfd_false, NAME(aout,sunos4_write_object_contents), /* bfd_write_contents */ _bfd_write_archive_contents, bfd_false}, diff --git a/bfd/ctor.c b/bfd/ctor.c index 65933736c2e..6d202691ebf 100644 --- a/bfd/ctor.c +++ b/bfd/ctor.c @@ -101,7 +101,7 @@ the entry points as they accumulate. *; PROTO(void, bfd_constructor_entry, (bfd *abfd, asymbol **symbol_ptr_ptr, - CONST char*type); + CONST char*type)); */ -- 2.30.2