COFF/PE gas regression: bug

Philippe De Muyter phdm@macqel.be
Mon Apr 5 16:39:00 GMT 1999


> > Can anybody try assembling
> > gas/testsuite/gas/all/cofftag.s on a native COFF system?

Here it is (on m68k-motorola-sysv). I have regenerated cofftag.s with my
native compiler, because my native assembler refused to assemble cofftag.s
from the testsuite.

---------------------------- cofftag.s -----------------------------------
	file	"cofftag.c"
	data	1
	global	token
token:
	short	0x0000
	text
	def	token;	scl	15;	type	012;	size	4;	endef
	def	operator;	val	0;	scl	16;	type	013;	endef
	def	flags;	val	1;	scl	16;	type	013;	endef
	def	~eos;	val	4;	scl	102;	tag	token;	size	4;	endef
	data	1
	even
	global	what
what:
	long	0
--------------------------------------------------------------------------

and here are the result of the native `nm' and of objdump --syms

phdm/mac_tst nm cofftag.o


Symbols from cofftag.o:

Name                  Value   Class        Type         Size   Line  Section

cofftag.c           |        | file |                  |      |     |
token               |        |entag |              enum|     4|     |
operator            |       0|enmem |             enmem|      |     |(ABS)
flags               |       1|enmem |             enmem|      |     |(ABS)
.eos                |        |endstr|              null|     4|     |(ABS)
token               |       0|extern|              null|      |     |.data
what                |       2|extern|              null|      |     |.data
phdm/mac_tst objdump --syms -a cofftag.o

cofftag.o:     file format coff-m68k
cofftag.o

SYMBOL TABLE:
[  0](sec -2)(fl 0x00)(ty   0)(scl 103) (nx 1) 0x00000000 cofftag.c
File
[  2](sec -2)(fl 0x00)(ty   a)(scl  15) (nx 1) 0x00000000 token
AUX lnno 0 size 0x4 tagndx 0 endndx 8
[  4](sec -1)(fl 0x00)(ty   b)(scl  16) (nx 0) 0x00000000 operator
[  5](sec -1)(fl 0x00)(ty   b)(scl  16) (nx 0) 0x00000001 flags
[  6](sec -1)(fl 0x00)(ty   0)(scl 102) (nx 1) 0x00000004 .eos
AUX lnno 0 size 0x4 tagndx 2
[  8](sec  1)(fl 0x00)(ty   0)(scl   3) (nx 1) 0x00000000 .text
AUX scnlen 0x0 nreloc 0 nlnno 0
[ 10](sec  2)(fl 0x00)(ty   0)(scl   3) (nx 1) 0x00000000 .data
AUX scnlen 0x8 nreloc 0 nlnno 0
[ 12](sec  3)(fl 0x00)(ty   0)(scl   3) (nx 1) 0x00000008 .bss
AUX scnlen 0x0 nreloc 0 nlnno 0
[ 14](sec  2)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000 token
[ 15](sec  2)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000002 what

The section number used is -1, not -2.  I still hope this helps.

Philippe



More information about the Gas2 mailing list