Per Bothner [Sat, 15 Feb 1992 22:07:15 +0000 (22:07 +0000)]
Major rewrite of how ld is configured. The major idea
is to use shell scripts to generate everything.
* generic.em replaces ldtemplate.
* Other *.em files replace various *.c files.
A *.em file is a shell script that generates the corresponding
ld__*.c file that implements an emulation. This is usually
a straight 'cat' of a here-document, possibly with substitutions.
* Script files (*.sc) are places by *.sc-sh scripts.
Again, these are simple shell scripts that 'cat'
here-documents, usually with some substitutions.
The output a *.sc-sh is a script file.
Fred Fish [Fri, 14 Feb 1992 01:22:12 +0000 (01:22 +0000)]
Fix code in elf_symtab_read which attempts to read the standard ELF
symbol table and add symbol information to the misc function vector.
This allows minimum functionality with non -g compiled code, and is
vital for use with shared libraries (non of which are currently
compiled with -g).
Note to anyone doing any SVR4/gdb work. This bug was introduced into
gdb just prior to the gdb 4.4 release, thus any versions currently
in the field will have broken shared library support since no symbol
information at all will be available for the shared library. This
fix, along with one about to go into bfd's elf.c should fix that
problem.
Michael Tiemann [Tue, 11 Feb 1992 10:34:03 +0000 (10:34 +0000)]
#include <sys/stdtypes.h> before <stddef.h> so that when we compile
with GCC, the compiler does not stumble over `size_t', `ptrdiff_t',
and `wchar_t'. Also note that the comment in <stddef.h> says that we
have to #include <sys/stdtypes.h> before including <stddef.h> when on
a sun.
* ldexp.c, ldlang.c: added new idea "abs_output_section", removes
tests for NULL pointers all over the place.
* ldlang.c (lang_process): remember to relocate global symbols
*after* relaxing has done it stuff.
Sean Eric Fagan [Tue, 11 Feb 1992 00:01:35 +0000 (00:01 +0000)]
all: Don't include <sys/file.h> if NO_SYS_FILE is defined. On the Apollo,
this file does not exist, and not including it hasn't seemed to
cause problems.
main.c: Use the proper enum's in the options structure initialization;
the Apollo compiler chokes on this.
Sean Eric Fagan [Mon, 10 Feb 1992 23:58:50 +0000 (23:58 +0000)]
Makefile.in: Removed some '#''s that caused an extraneous include of
the host/site/target files.
configure.in: Added support for hosting on an Apollo Series 400, and
targeting on an OS/68k machine.
In configure{.in} {host|target}_makefile_frag should name a file
relative to srcdir. I think it now does. configure has been
corrected. configure.texi has been clarified.
Per Bothner [Thu, 6 Feb 1992 23:24:30 +0000 (23:24 +0000)]
* mipsread.c (parse_partial_symbols): Handle dependencies
between partial symbol tables (when not doing stabs-in-ecoff).
(This used to be handled by parse_fdr, but parse_fdr was
incompatible with handling stabs-in-ecoff, so the code
was re-written to not use parse_fdr. Unfortunately,
the logic to handle dependencies was overlooked.)
* as.c: added new option -ad for hll listings without debug info
* listing.c,listing.h: support for new listings, and more for forgiving
when lied to about where linenumbers are.
* config/obj-coffbfd.c (do_linenos_for): relocate line numbers
correctly.
* coffread.c (read_enum_type): Use the size of a target int when
describing enum.
* defs.h: added new #define for TARGET_PTR_BIT, defaults to size
of target int.
* h8300-tdep.c, remote-hms.c, tm-h8300.h: too many changes to count
* symtab.c (lookup_reference_type, lookup_ptr_type): use
TARGET_PTR_BIT to determine size of a pointer
* values.c (unpack_long): when unpacking a REF or a PTR don't
assume the size of the type.
* config/mt-coff-h8300: use EMUL like everything else
* ldlang.c: (print_padding_statement): print the right address.
* Makefile.in, config.h, ldemul.c: renamed h8300hds to h8300hms
* coffcode.h, libcoff.c: added new fielded to coff_symbol_struct
"done_lineno" so that a symbol which appears twice in the symbol
table only gets it's linenumbers relocated once. Modifed
(coff_write_native_symbol) and (coff_make_empty_symbol) to make
John Gilmore [Thu, 6 Feb 1992 06:33:15 +0000 (06:33 +0000)]
* mipsread.c (parse_symbol): Avoid clobbering enum pointer when
looking at its members. Improve guess between struct and union,
only assuming union if multiple members have offsets of zero.
Converting "[ -n" and "[ -z" into case statements looks like a small
time penalty for modern shells which have "[" builtin. I've elected
to take it anyway as a compensation for older, slower shells.
support for subdirs, multiple hosts, and multiple targets was
previously commented out. This delta removes it entirely. This makes
a small time difference on cygint.
Removing unnecessary ()'s doesn't seem to make any time difference on
cygint. I think modern shell's execute this internally without a call
to a separate shell process. I've left the change in anyway. It may
help on older, slower machines.
John Gilmore [Fri, 31 Jan 1992 20:37:24 +0000 (20:37 +0000)]
* symfile.c (reread_symbols): Whenever we reread one object
file's symbols, we must restart the scan, because the object_files
chain has been permuted.