2000-08-22 H.J. Lu <hjl@gnu.org>

* config.in (STRICTCOFF): New for strict COFF.

	* configure.in: Define STRICTCOFF for i386-*-msdosdjgpp*,
	i386-*-go32* and i386-go32-rtems*.
	* configure: Rebuilt.

	* config/obj-coff.c (obj_coff_endef): Follow the historical
	behavior if STRICTCOFF is not defined.

	* doc/internals.texi: Document STRICTCOFF.
This commit is contained in:
H.J. Lu 2000-08-22 19:14:32 +00:00
parent 5e0c222624
commit 56385375da
6 changed files with 281 additions and 227 deletions

View File

@ -1,3 +1,16 @@
2000-08-22 H.J. Lu <hjl@gnu.org>
* config.in (STRICTCOFF): New for strict COFF.
* configure.in: Define STRICTCOFF for i386-*-msdosdjgpp*,
i386-*-go32* and i386-go32-rtems*.
* configure: Rebuilt.
* config/obj-coff.c (obj_coff_endef): Follow the historical
behavior if STRICTCOFF is not defined.
* doc/internals.texi: Document STRICTCOFF.
2000-08-22 Alexandre Oliva <aoliva@redhat.com>
* write.c (TC_FIX_ADJUSTABLE): Define to 1, if not defined.

View File

@ -166,6 +166,9 @@
/* Using cgen code? */
#undef USING_CGEN
/* Using strict COFF? */
#undef STRICTCOFF
/* Using i386 COFF? */
#undef I386COFF

View File

@ -732,14 +732,50 @@ obj_coff_endef (ignore)
case C_ARG:
case C_REGPARM:
case C_FIELD:
/* According to the COFF documentation:
http://osr5doc.sco.com:1996/topics/COFF_SectNumFld.html
A special section number (-2) marks symbolic debugging symbols,
including structure/union/enumeration tag names, typedefs, and
the name of the file. A section number of -1 indicates that the
symbol has a value but is not relocatable. Examples of
absolute-valued symbols include automatic and register variables,
function arguments, and .eos symbols.
But from Ian Lance Taylor:
http://sources.redhat.com/ml/binutils/2000-08/msg00202.html
the actual tools all marked them as section -1. So the GNU COFF
assembler follows historical COFF assemblers.
However, it causes problems for djgpp
http://sources.redhat.com/ml/binutils/2000-08/msg00210.html
By defining STRICTCOFF, a COFF port can make the assembler to
follow the documented behavior. */
#ifdef STRICTCOFF
case C_MOS:
case C_MOE:
case C_MOU:
case C_EOS:
#endif
SF_SET_DEBUG (def_symbol_in_progress);
S_SET_SEGMENT (def_symbol_in_progress, absolute_section);
break;
#ifndef STRICTCOFF
case C_MOS:
case C_MOE:
case C_MOU:
case C_EOS:
S_SET_SEGMENT (def_symbol_in_progress, absolute_section);
break;
#endif
case C_EXT:
case C_WEAKEXT:
#ifdef TE_PE

436
gas/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -251,7 +251,9 @@ changequote([,])dnl
i386-*-sco3.2*) fmt=coff ;;
i386-*-vsta) fmt=aout ;;
i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*)
fmt=coff em=go32;;
fmt=coff em=go32
AC_DEFINE(STRICTCOFF, 1, [Using strict COFF?])
;;
i386-*-rtemself*) fmt=elf ;;
i386-*-rtems*) fmt=coff ;;
i386-*-gnu*) fmt=elf ;;

View File

@ -773,6 +773,12 @@ variable. Normally the default value of @samp{generic} is fine. The
configuration process will create a file named @file{targ-env.h} in the build
directory which includes @file{te-@var{em}.h}.
There is a special case for COFF. For historical reason, the GNU COFF
assembler doesn't follow the documented behavior on certain debug symbols for
the compatibility with other COFF assemblers. A port can define
@code{STRICTCOFF} in the configure script to make the GNU COFF assembler
to follow the documented behavior.
Porting GAS to a new CPU requires writing the @file{tc-@var{CPU}} files.
Porting GAS to a new object file format requires writing the
@file{obj-@var{fmt}} files. There is sometimes some interaction between these