Fri Mar 10 15:50:45 1989  Randall Smith  (randy at sugar-bombs.ai.mit.edu)

	* ranlib.c (touch): Created to simply touch an archive (update the
	date on the symdef member).  Done here since adding an option to
	ar.c would be a hassle and using the routines in ar.c would
	require doing almost all of the work of an "ar rs x.a" anyway.
	Same result in both cases; differing amounts of time.

Mon Mar  6 15:27:56 1989  Jay Fenlason  (hack at apple-gunkies.ai.mit.edu)

	* gprof.c (ck_fclose) only fflush() streams opened for writing.

Sun Mar  5 17:13:37 1989  Randall Smith  (randy at gluteus.ai.mit.edu)

	* ar.c (write_archive): Modified test to write symdef header;
	wasn't being done if the symdef map entry didn't need to be newly
	created. 

Fri Mar  3 10:56:55 1989  Randall Smith  (randy at apple-gunkies.ai.mit.edu)

	* *.*, Makefile: Changed to use new wording as directed by the new
	GNU General Public License.
	* COPYING: Created as a link to /gp/rms/COPYING.

Wed Feb 22 04:42:54 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)

	* Makefile: Use GNU getopt by preference.

	* gprof.c [USG]: Define bcopy as macro.

Tue Feb 21 04:46:44 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)

	* ld.c (INITIALIZE_HEADER) [HPUX]: Use N_SET_MACHTYPE.

Sat Feb 18 12:47:36 1989  Randall Smith  (randy at apple-gunkies.ai.mit.edu)

	* Makefile: Added note for using GNU getopt for app routines.
	Linked (symlink) it into this directory.

	* ld.c: Added #ifndef sony_news around inclusion of fcntl.h.  This
	file duplicates code in sys/file.h on the sony.

	* nm.c: Added include of alloca.h on a sun4 and use of
	__builtin_alloca if compiling with GCC.

Sat Feb 18 09:43:51 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)

	* ar.c (write_archive): Don't die if info.name is 0 (member deleted).
	(scan): Reverse fread args, so value is right.

Fri Feb 17 05:19:50 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)

	* ar.c (extract_members, scan): Open just a FILE *, and pass that.
	(extract_member, print_contents): Expect a FILE *; no need to fdopen.

Thu Feb 16 07:36:03 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)

	* gprof.c: Reformatted.

Fri Feb  3 14:28:24 1989  Randall Smith  (randy at apple-gunkies.ai.mit.edu)

	* ld.c (do_warnings): Changed calls to each_full_file to each_file
	(which is what we want, since we are concerned with symbol
	definitions).

	* ld.c: Added a parameter MAX_ALIGNMENT, defined in #ifdef sparc
	and by default, to set the maximum necessary alignment for data
	objects on this machine.  This is necessary for allocation in the
	bss area.
	(digest_symbols): Made sure that everything allocated had the
	minimum of it's alignment (lowest bit set in the size) or the
	MAX_ALIGNMENT. 

Thu Jan 26 13:31:52 1989  Pace Willison  (pace at apple-gunkies.ai.mit.edu)

	* Makefile: Delete -Dnounderscore, add gprof to USG PROG list

	* ar.c (rename for USG): ignore error from first unlink

	* gprof.c: COFF_ENCAPSULATE and USG changes.

	* ld.c strip.c: Deal with internal labels starting with '.' on
	nounderscore machines and 'L' on normal ones (LPREFIX).

	* ld.c(next_debug_entry): Mask n_type field in switch statement
	since it is a char, and some of its values (N_SOL) are > 128, which
	get sign extended on some machines.

	* objdump.c: Deal with symbols that have no name; mask fields 
	of nlist before printing.

Mon Jan 23 14:08:43 1989  Randall Smith  (randy at plantaris.ai.mit.edu)

	* ld.c (coptxtrel, copdatrel): Made sure that, when relocation is
	being copied, that N_INDR symbols were properly followed.  Also
	made sure that the symbol indicies were correct even in the
	presence of indirection information.

	* ld.c (write_rel): When specifying symbol numbers, make sure to
	leave room for the extra undefined ref that will be written for
	the sake of N_INDR entries.

	* ld.c (write_syms): Fixed typo; a duplicate of the N_INDR entry
	was being written instead of the undefined ref required.

Tue Jan 17 16:23:56 1989  Randall Smith  (randy at apple-gunkies.ai.mit.edu)

	* strip.c (rename): Arranged to ignore return code from "unlink";
	file may not be there.

Thu Jan 12 15:24:23 1989  Randall Smith  (randy at apple-gunkies.ai.mit.edu)

	* Makefile: Modified "dist" target so as to get hp-*
	subdirectories. 

	* strip.c (rename): Added function to mimic BSD system call for
	system V.

Tue Jan 10 19:44:33 1989  Pace Willison  (pace at prep.ai.mit.edu)

	* Makefile: put -Dnounderscore back for COFF_ENCAPSULATE.

Tue Jan 10 17:58:50 1989  Randall Smith  (randy at cream-of-wheat.ai.mit.edu)

	* ld.c (linear_library, symdef_library, list_file_locals,
	write_file_syms): Took care to make sure that when the buffer
	pointed to by entry->strings became invalid, entry->strings was
	set to zero (either on a free or a function return if space had
	been allocated through alloca).

	* ld.c (getpagesize): Deleted define in hpux dependent section;
	taken care of when compiling on hpux because of define of USG in
	Makefile. 

Mon Jan  9 22:49:42 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)

	* strip.c (strip_file): Effectively defer certain signals
	while rewriting the file.

Mon Jan  9 09:45:41 1989  Pace Willisson  (pace at prep.ai.mit.edu)

	* These changes improve support for COFF_ENCAPSULATE, and
	for the future development of the GNU exec header.  The
	main change is to rename the exec header field a_magic
	so that it can contain additional information.  Now, the
	magic number must be accessed with N_MAGIC(exec), and set
	with N_SET_MAGIC(exec,val).  Programs that only need to use
	N_BADMAG will not have to change.  Also COFF_ENCAPSULATE will
	no longer use "nounderscore", so that it will be more like
	normal bsd systems.  This means gcc must be updated before using
	these new tools.  (It is safe to put -Dnounderscore back in
	if you want to use an old gcc for a while.)

	* README-ENCAP: new documentation for how to set up to use
	COFF_ENCAPSULATE.

	* Makefile:  Add target for gnulib.
	Don't define 'nounderscore' (must tell gcc about that too.)

	* ar.c: Don't automatically define COFF_ENCAPSULATE.

	* nm.c: No need to initialize the header before reading it.

	* size.c: Include, sys/types.h, and sys/fcntl.h if USG
	* strip.c: Likewise--types.h before file.h.

	* ld.c, objdump.c, robotussin.c:
	Changed to use new exec macros for a_magic.

	* libconvert: now takes arguments

	* robotussin.c: don't automatically define nounderscore - leave
	that to the makefile, if desired

Fri Jan  6 13:06:37 1989  Randall Smith  (randy at apple-gunkies.ai.mit.edu)

	* ld.c (digest_symbols, write_text, write_data): Changed N_SETV
	from being in the text area to being in the data area.
	* nm.c, a.out.gnu.h: Changed comments to conform with above.

	* ld.c (do_file_warnings): Added loop to go through each external
	nlist entry and check for multiple definitions, as well as
	catching any references which weren't caught by the relocation
	pass. 

	* ld.c (address_to_line): Changed so that it will work (albeit
	slowly) with an address less than the current address.
	(do_file_warnings, do_relocation_warnings): Broke out scan through
	relocation entries into a separate function.  Added creation of a
	bitvector with each bit refereing to an nlist entry so that
	do_relocation_warnings could mark which symbol entries it had
	output for undefined references.

Thu Jan  5 20:36:44 1989  Randall Smith  (randy at apple-gunkies.ai.mit.edu)

	* ld.c: Cosmetic changes: Moved helper functions for
	do_file_warnings to before it and modified comments to
	next_debug_symbol and address_to_line.

Wed Jan  4 15:37:52 1989  Randall Smith  (randy at gluteus.ai.mit.edu)

	* ld.c: Added #define getpagesize() EXEC_PAGESIZE for hpux.

	* ld.c (do_warnings): Will now print out all undefined external
	symbols which were not referenced from the text or data sections
	separately.
	(do_file_warnings): Decreases undefined_global_sym_count for each
	symbol printed.

Tue Jan  3 23:43:41 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)

	* Makefile (nm): Link with $(LIBS).

	* ld.c (getpagesize): HPUX definition deleted; not needed.

Mon Jan  2 23:04:35 1989  Randall Smith  (randy at apple-gunkies.ai.mit.edu)

	* ld.c (digest_symbols): Modified the creation of set vectors
	to include a zero word after the end  of the vector.
	(write_text): Made the same modification of the set vector section
	size. 

Sun Jan  1 12:01:22 1989  Randall Smith  (randy at apple-gunkies.ai.mit.edu)

	* ld.c: Fixed typo in description of relocation values, and
	changed note on RELOC_ADD_EXTRA to force is to be an lvalue if
	it's defined.
	(coptxtrel): If a specific relocation entry has just changed from
	external to internal, and we aren't supposed to add in memory on
	the new relocation value, make sure that the value of the symbol
	get's added to the ADD_EXTRA in the relocation value.  Otherwise,
	all the work we do in a partial linking will be wasted (will be in
	memory, but will be ignored on the next pass of the linker).

Sat Dec 31 13:13:01 1988  Randall Smith  (randy at apple-gunkies.ai.mit.edu)

	* ld.c: Removed "|| TARGET == SUN2" from line 210; I believe that
	TARGET and SUN2 were both showing up defined as 0 on the sparc,
	which resulted in a redefine of the INITIALIZE_HEADER macro, back
	to sun2 style.

Thu Dec 29 01:48:03 1988  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)

	* ld.c, ar.c: Don't define COFF_ENCAPSULATE automatically.
	The recommended Makefile change defines it.

	* ld.c (alloca): If compiling with GCC, use __builtin_alloca.

	* robotussin.c: New reformatted version with all variables renamed.

	* ranlib.c: New file, just runs `ar rs' on each specified file.
	* Makefile: Special hack to tell ranlib where to find GNU ar.
	(LIBS): Recommend -lPW on USG; ld needs it for alloca (if not GCC).

Sat Dec 24 13:59:09 1988  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)

	* ld.c (error): Start with name of program running.
	(main): Set `progname' to that name.
	(digest_symbols): Fix punctuation and spelling in calls to `error'.

Tue Dec 20 21:49:46 1988  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)

	* robotussin.c (INPUT_MAGIC): New macro, has the magic number
	to expect in input files.
	(nounderscore): New macro; as in ld, define it to inhibit
	adding underscore to symbols.

	* Makefile: Don't compile objdump on BSD; N_DATADDR causes trouble.

Tue Dec 20 14:57:38 1988  Pace Willisson  (pace at prep.at.mit.edu)

	* objdump.c: New program like the system 5 'dump' program.
	Documentation will follow...

	* Makefile: Set up CFLAGS for USG systems.  Added target
	libc.a to do robotussin conversion.  Added objdump.

	* libconvert: Wrote shell script to do robotussin conversion.

	* ar.c, ld.c: Don't define COFF_ENCAPSULATE if it is already defined.

	* ld.c: If i386, set a_machtype to M_386.  Use a_flags instead
	of a_encap.  Don't compute coff header if it isn't going to
	get written out.

	* robotussin.c: Define COFF_ENCAPSULATE. Include a.out.encap.h
	instead of a.out.h.  Check magic number of input
	file.  Skip over optional header, if present.  Don't ignore
	symbols with aux entries (they could be function definitions),
	instead, ignore symbols beginning with '.' (.text, etc).
	Don't prepend underscore to externals, since gcc doesn't do
	it now.  Don't run past the end of symbols that are exactly
	eight characters long.  Always write the string table size,
	even if it is empty.  Change relocation types handled from
	R_PCRBYTE, etc, to R_DIR32 and R_PCRLONG (these are the
	only two emitted by the system 5 assembler.)

	* size.c: Include <sys/types.h> so including sys/file.h will
	not get an error on USG systems.  Include fcntl.h on usg systems.

	* strip.c: Move inclusion of file.h to after types.h.  Include
	fcntl.h.  Add defintion of rename.

Fri Dec 16 13:55:11 1988  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)

	* size.c: Delete all ROBOTUSSIN conditionals and contents.
	Change SYSV conditionals to USG.
	COFF_ENCAPSULATE conditionals for headers.
	(do_one_file, read_header): Skip encapsulation headers if any.

	* strip.c: Delete all ROBOTUSSIN conditionals and contents.
	Change SYSV conditionals to USG.
	COFF_ENCAPSULATE conditionals for headers.
	(file_open, read_header): Skip encapsulation headers if any.

	* strip.c: Change most fatal errors to nonfatal.
	(file_open, read_header, read_{file,entry}_symbols):
	Now return 0 for success, -1 for failure.
	Failure means do no more for the current file.
	(modify_relocation): Now just warn if strip a symbol needed
	for relocation, and warn only once per file.
	(error_with_file): New function, replaces most fatal_with_file.
	Print filename first, as in most programs.
	(fatal_with_file): Deleted.
	(rewrite_file_symbols): Use perror_file when system call fails.

Tue Dec 13 17:16:39 1988  Jay Fenlason  (hack at apple-gunkies.ai.mit.edu)

	* ar.c:  Changed pad character after odd-length archive member
	from \0 to \n so archives can be cmp'd with the output from /bin/ar
	Added fix for when ranlib is using ar to insert an __.SYMDEF member

Tue Dec 13 09:09:27 1988  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)

	* ar.c: conditional #includes for USG.
	* COFF_ENCAPSULATE conditionals for headers.
	(extract_member): Don't do fchmod if USG.
	Alternate USG code to set modtimes of extracted members.
	(write_archive): Don't do fsync if USG.
	(make_new_symdefs): Skip encapsulation headers if any.
	[USG] (bcopy, bzero, bcmp): New fns.

	* nm.c: Delete all ROBOTUSSIN conditionals and contents.
	Include types.h.
	Change SYSV conditionals to USG.
	* COFF_ENCAPSULATE conditionals for headers.
	(do_one_file): Skip encapsulation headers if any.
	(read_header): Likewise.

	* ld.c: Delete all ROBOTUSSIN conditionals and contents.
	Change SYSV conditionals to USG.
	Change HEADER_TYPE back to `struct exec'.
	(L_SET): Define it if headers don't.
	* COFF_ENCAPSULATE conditionals for headers.
	(main): Update text_size differently if encapsulating.
	(write_header): Write the encapsulation headers if nec.
	Don't end with padding if encapsulation being done.
	[USG] (bzero, bcopy, getpagesize): New fns.

Tue Dec  6 13:26:56 1988  Randall Smith  (randy at apple-gunkies.ai.mit.edu)

	* ld.c (do_file_warnings): Ignored text relocation entries that
	went through local symbols; any problems with lack of definitions
	etc. with them would have been caught by the compiler.

Mon Dec  5 16:13:22 1988  Jay Fenlason  (hack at sugar-bombs.ai.mit.edu)

	* ar.c (make_new_symdefs): On error, close the input files.

Thu Nov 10 18:15:07 1988  Randall Smith  (randy at apple-gunkies.ai.mit.edu)

	* ld.c: Put declaration of alloca inside an #ifdef so that it
	wouldn't mess up on the sparc.

	* ld.c: Added #define CORE_ADDR for include of symseg.h from gdb
	and took out TARGET == SUN2 for sun2 INITIALIZE_HEADER.

Wed Nov  2 18:43:09 1988  Randall Smith  (randy at gluteus.ai.mit.edu)

	* ld.c: Merged in isi68k port.  This included a kludge for symbols
	starting with _$ (#ifdef DOLLAR_KLUDGE) and addition of the
	STANDARD_SEARCH_DIRS macro to override the default if it's
	defined. 

	* ld.c: Added code for the N_WARNING symbol type.  If a reference
	is found to a symbol in an input .o file which contains an
	N_WARNING symbol, a warning message (the name of the N_WARNING
	symbol) is printed.  This name is treated as a printf format
	string; the name of the symbol referenced (which caused the
	warning) is supplied as a single argument to the print which
	interpets this string.

Tue Nov  1 16:57:00 1988  Randall Smith  (randy at gluteus.ai.mit.edu)

	* ld.c: Added code for Sun 2.

	* ld.c: Modified access to the relocation information to be *much*
	more general; added in sparc support.  This change is a minor
	performance hit; the perform_relocation routine uses about 0.1
	seconds more time on linking gdb than did the original ld.
	(perform_relocation is about 5% of the total time the loader
	spends).  The price of generality.

Thu Aug  4 13:20:50 1988  Randy Smith  (randy at rice-chex.ai.mit.edu)

	* Modified ld.c to print only the first 10 unresolved references
	for each symbol, followed by a message indicating that there are
	more unresolved references that have not been printed (if indeed
	there are).  Made default behaivior upon errors *not* writing any
	output file at all.  Also added the -noinhibit-exec flag to force
	writing of an executable when that was desirable.

Tue Aug  2 12:04:01 1988  Randy Smith  (randy at rice-chex.ai.mit.edu)

	* Modified ld.c to give line numbers wherever possible on
	unreferenced symbols.  Added a new symbol (N_DSLNE) to allow for
	the same mapping of data location to line number as is done for
	text segments by N_SLINE.  Added code to sort the relocation
	entries when it is necessary to output these line numbers.  The
	assumption was made that both N_SLINE and N_DSLNE symbols would
	always be in order by address.

Wed Jul 27 15:13:08 1988  Randy Smith  (randy at rice-chex.ai.mit.edu)

	* Modified ld.c to include a facility for equivalencing two
	symbols (translating one to another).  Modified lib/a.out.h to
	include a definition of this new symbol.  Modified nm.c to
	recognize this symbol and all of the set element and vector
	symbols I had added before.

Thu Jul 21 17:06:10 1988  Randy Smith  (randy at rice-chex.ai.mit.edu)

	* Modified ld.c to printout source file and line numbers for
	unresolved references whenever possible (ie. whenever the input
	file has debugger symbols and the reference is from the text area).

Wed Jul 13 17:21:33 1988  Randy Smith  (randy at frosted-flakes.ai.mit.edu)

	* Modified ld.c and a.out.h to handle new types of symbols; the
	loader can now create "sets" of symbols from entries in its input
	files.  See a.out.h for more info.  Also fixed a bug in ld in
	which references to common areas that we not defined in one pass
	of the loader caused errors on the next.

Sat Jul  2 00:05:44 1988  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)

	* ld.c (symdef_library): Error check was off by one.

Mon May  9 12:53:08 1988  Chris Hanson  (cph at kleph)

	* ar.c (replace_members): After updating map, write out
	`change_map->next' rather than `map', since the latter may be
	null.
