mb@ttidca.TTI.COM (Michael Bloom) (09/18/90)
A new version of changes to gas and gdb for coff on Sun386i and vanilla System V systems is now available for anonymous uucp and anonymous ftp from Ohio State University as follows: UUCP: osu-cis!~/gnu/coff/gnu-coff.tar.Z FTP: tut.cis.ohio-state.edu:/pub/gnu/coff/gnu-coff.tar.Z Anyone maintaining a source archive containing the previous version should replace the old version with this update. WHATS NEW: Changes from the previous version include increased generality and support (via generation of ".ctor" and ".dtor" coff sections and the use of a loader directives file) for linking g++ programs in one step without using collect or a second link. Bugs reported in the previous version have been fixed. Particularly important for g++ users, the bug with handling line numbers in objects containing functions that were defined in #included files has been fixed. Support for the 386 "smovl" instruction generated by native compilers (but not gcc) has been added. (I've sent mail to FSF on this, but it seems to have been either ignored or lost). New config files supporting SYSV/386 systems. Also included is a new program, humantussin, which allows you to convert a.out objects to coff. This is present for the benefit of those who had previously been using an a.out only version of gas. The main benefit of these changes for both sun 386 systems and vanilla coff systems is that gas can now work with the native coff loader giving you the ability to use gcc, g++, and gdb together without the hassle and disk waste of coff encapsulation. For most coff systems, the "collect" and "second load" phases are also eliminated. An important benefit is that these patches support dbx-style "stab" debug symbols (which convey more information to the debugger than sdb debug symbols are capable of) in the coff object file. (This is not new for the sun386i: Sun already uses stab debug symbols there). Gdb works much better with these, and you have the use of the add-file command which would not available with sdb debug symbols. These changes work for the Sun 386i, several SYSV/386 systems, several SYSV/68K systems, and one SYSV/sparc system. For other architectures (such as ns32k) one would need to add code to generate appropriate coff relocation information. The changes to gas are based upon work done by John Vasta at Apollo to allow gas to produce coff output for apollo systems. To his changes, I've added the support for 386 relocation types, cross assembly, stab debug symbols in the coff symbol table (gdb is so much nicer when using stab debug symbols instead of sdb debug symbols), and generation of coff sections containing global constructor and destructor addresses for g++ The diffs to existing gas sources have been kept minimal, and should apply to any recent version of gas, although there is a severe bug in 1.35 that bites badly on the 386 (1.36 is OK). The coff output module itself is independent of the version of gas being used. Changes to it should require no corresponding changes to gas. Likewise, changes in gas should not require any changes to the coff output module. There are 5 subdirectories within the tar file. Their contents include: gas-1.36: o copies of stab.gnu.h and stab.def from other GNU utils. o new gas source files and Makefile o minimal changes to existing gas source files including: o Addition of support for 386 "smovl" instruction. (my mail to fsf on this seems to have been ignored) o support for command line flag saying whether to produce coff or a.out o 386 cross-assembly bug fix and recognition of sun's "optim" pseudo-op o support for optional m68k REGISTER_PREFIX o optional support for ".L" rather than "L" as an indicator of a compiler generated local label. gcc-1.37.1: o A small patch to gcc's m68k.md to conditionally allow an assembly output form to be specified in a supplied "tm-" file. o Some other minor gcc patches o Gcc config files that are needed for some 68k SysV systems (but (not needed for 386 systems) to support a modified 68k gas assembly syntax that among other things supports a % register prefix. o A gcc config file for sysV/386 systems. g++-1.37.1: o Small patch to gnulib3.c, that works in conjunction with a new loader directive file that eliminates the need for collect on most coff systems. o new source file "make_ifile.c", that generates a loader directive file that should be appropriate for your system. o fixes for g++'s collect.c: o Fix for generation of assembly that gas would not accept. o support for stabs in coff conditionalized on "DBX_IN_COFF". o Fix to g++'s gcc.c: o Add "%a" to collect_spec so that the flag that specifies coff output is passed to gas when called during the collect phase, if specified for the target machine. o A patch from James Clark for dbxout.c. This is in a separate patch file because, while it looks reasonable, I have not tested it. gdb-3.5: o Diffs to gdb-3.5 supplying: o patches to gdb-3.5 (including the string table patch from kingdon, and bug fixes from pre-4.0 sources). o some other minor bugfixes o mods to dbxread.c to reduce a.out dependencies o a new header 'coff-dbx.h' o A new source file 'coff-dbx.c' that 'normalizes' coff symbols to make dbxread happy. Used together with machine specific dep.c o New config files: m-i386gcoff.h m-pbb.h m-sun386i.h, and m-coffdbx.h (The first three #include the fourth) o New dep.c files: pbb-dep.c sun386i-dep.c InterViews: o Minor patches for: libInterViews/_ctorlist.c libInterViews/_dtorlist.c libInterViews/_init.c