mb@ttidca.TTI.COM (Michael Bloom) (07/04/90)
Changes to make gas and gdb work on the sun386i and on systems using vanilla COFF (using stab debug symbols with the native coff loader in either case) are now available for anonymous ftp at sequent.kent.edu in pub/unix386/gnu/ in the files "gas-coff.tar.Z" and "gdb-coff-stabs.tar.Z". I am thankful to Yaser Doleh at Kent State University for making these changes available via ftp. The main benefit 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. Another benefit for vanilla coff systems is the use of 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. So far I've used gas with these changes on a 68K System V system (with the stock COFF loader) and on a Sun 386i (with their "extended coff" loader). For other architectures one might have 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, and stab debug symbols in the coff symbol table. (gdb is so much nicer when using stab debug symbols instead of sdb debug symbols). The diffs to existing gas sources have been kept minimal, and should apply to any recent version of gas. 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 two tars. The first, gas-coff.tar, contains: o copies of stab.gnu.h and stab.def from other GNU utils. o new gas source files o minimal changes to existing gas source files including: 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. o Changes to Makefile for compilation in separate directory and use of new source file. (Makefile accounts for roughly 50% of the DIFFS) 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 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 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. The second tar file, gdb-coff-stabs.tar, contains: o Diffs to gdb-3.5 supplying: o Upgrade gdb-3.5 to approximately 3.5.2 (includes the unofficial string table patch from kingdon). o a new header 'coff-a.out.h' o mods to dbxread.c to remove a.out dependencies o some minor bugfixes o A new source file 'coff-dbx-dep.c' that 'normalizes' coff symbols to make dbxread happy. Used together with machine specific dep.c o dep.c and param.h files for the sun-386i Contains code and definitions to make gdb to work with native Sun386i COFF object format. o dep.c and param.h files for TTI Unicom PBB Contains code and definitions to make gdb to work with the stab debug symbols in the Vanilla System V coff produced by gas-1.36 with the changes in gas-coff.tar At least for the sun 386 I strongly recommend NOT using version 1.35, which has a serious bug in setting the location counter with the 'set' directive (1.36 works fine).