From: Jeff Law Date: Mon, 13 Jun 1994 02:31:43 +0000 (+0000) Subject: * som.c (EXEC_AUX_ID): Define based on availablity of HPUX_AUX_ID X-Git-Tag: gdb-4_18~14311 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8117e1ea9af23fc978d27478b5154c9e750d1b0d;p=external%2Fbinutils.git * som.c (EXEC_AUX_ID): Define based on availablity of HPUX_AUX_ID or HIUX_AUX_ID. (som_begin_writing): Use EXEC_AUX_ID instead of HPUX_AUX_ID. (som_write_armap): Use CPU_PA_RISC1_0 as the magic number. Note som.c is careful to always define CPU_PA_RISC1_0. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 7984467..ba0d2ec 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +Sun Jun 12 20:21:03 1994 Jeff Law (law@snake.cs.utah.edu) + + * som.c (EXEC_AUX_ID): Define based on availablity of HPUX_AUX_ID + or HIUX_AUX_ID. + (som_begin_writing): Use EXEC_AUX_ID instead of HPUX_AUX_ID. + (som_write_armap): Use CPU_PA_RISC1_0 as the magic number. Note + som.c is careful to always define CPU_PA_RISC1_0. + Sat Jun 11 16:32:30 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) Add weak symbols as an extension to a.out. diff --git a/bfd/som.c b/bfd/som.c index b67a87b..da36edf 100644 --- a/bfd/som.c +++ b/bfd/som.c @@ -64,6 +64,22 @@ ((__m_num) >= _PA_RISC1_1_ID && (__m_num) <= _PA_RISC_MAXID)) #endif /* _PA_RISC_ID */ + +/* HIUX in it's infinite stupidity changed the names for several "well + known" constants. Work around such braindamage. Try the HPUX version + first, then the HIUX version, and finally provide a default. */ +#ifdef HPUX_AUX_ID +#define EXEC_AUX_ID HPUX_AUX_ID +#endif + +#if !defined (EXEC_AUX_ID) && defined (HIUX_AUX_ID) +#define EXEC_AUX_ID HIUX_AUX_ID +#endif + +#ifndef EXEC_AUX_ID +#define EXEC_AUX_ID 0 +#endif + /* Size (in chars) of the temporary buffers used during fixup and string table writes. */ @@ -2767,7 +2783,7 @@ som_begin_writing (abfd) current_offset += sizeof (exec_header); obj_som_file_hdr (abfd)->aux_header_size += sizeof (exec_header); memset (&exec_header, 0, sizeof (exec_header)); - exec_header.som_auxhdr.type = HPUX_AUX_ID; + exec_header.som_auxhdr.type = EXEC_AUX_ID; exec_header.som_auxhdr.length = 40; } if (obj_som_version_hdr (abfd) != NULL) @@ -3312,6 +3328,10 @@ som_write_headers (abfd) else obj_som_file_hdr(abfd)->system_id = CPU_PA_RISC1_0; + /* Compute the checksum for the file header just before writing + the header to disk. */ + obj_som_file_hdr (abfd)->checksum = som_compute_checksum (abfd); + /* Only thing left to do is write out the file header. It is always at location zero. Seek there and write it. */ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) < 0) @@ -3527,9 +3547,6 @@ som_write_object_contents (abfd) if (som_build_and_write_symbol_table (abfd) == false) return false; - /* Compute the checksum for the file header just before writing - the header to disk. */ - obj_som_file_hdr (abfd)->checksum = som_compute_checksum (abfd); return (som_write_headers (abfd)); } @@ -5377,7 +5394,7 @@ som_write_armap (abfd, elength, map, orl_count, stridx) lst_size = sizeof (struct lst_header); /* Start building the LST header. */ - lst.system_id = HP9000S800_ID; + lst.system_id = CPU_PA_RISC1_0; lst.a_magic = LIBMAGIC; lst.version_id = VERSION_ID; lst.file_time.secs = 0;