This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

MIPS/gas bug


The attached ptrflags.s file causes gas to generate incorrect object files. It was generated by a recient gcc3.4 snapshop from ptrflags.C in the g++ testsuite.

The failure is in H.J Lu's 2.14.90.0.5 20030722 as well as the 031106 snapshot that I just built.

Both are configured like this:

../binutils-031106/configure --host=i686-pc-linux-gnu --target=mipsisa32el-linux --prefix=/home/mipsel-linux '--libdir=${exec_prefix}/mipsel-linux/i386-linux/lib'

The gas command line that creates the bad output is:

mipsel-butest/gas/as-new -EL -32 -v -KPIC -o ptrflags.o ptrflags.s

$ mipsel-linux-readelf -r ptrflags.o

Relocation section '.rel.text' at offset 0x167c contains 35 entries:
 Offset     Info    Type            Sym.Value  Sym. Name
00000000  00002b05 R_MIPS_HI16       00000000   _gp_disp
00000004  00002b06 R_MIPS_LO16       00000000   _gp_disp
00000040  00002c0b R_MIPS_CALL16     00000000   __dynamic_cast
00000048  00002d09 R_MIPS_GOT16      00000000   _ZTISt9type_info
0000004c  00002e09 R_MIPS_GOT16      00000000   _ZTIN10__cxxabiv117__p
000000c8  00002b05 R_MIPS_HI16       00000000   _gp_disp
000000cc  00002b06 R_MIPS_LO16       00000000   _gp_disp
000000ec  00003009 R_MIPS_GOT16      00000000   _ZTIP1A
000000f0  00002a0b R_MIPS_CALL16     00000000   _Z6expectiRKSt9type_in
0000011c  00003109 R_MIPS_GOT16      00000000   _ZTIPK1A
00000120  00002a0b R_MIPS_CALL16     00000000   _Z6expectiRKSt9type_in
0000014c  00003209 R_MIPS_GOT16      00000000   _ZTIPV1A
00000150  00002a0b R_MIPS_CALL16     00000000   _Z6expectiRKSt9type_in
0000017c  00003309 R_MIPS_GOT16      00000000   _ZTIPrP1A
00000180  00002a0b R_MIPS_CALL16     00000000   _Z6expectiRKSt9type_in
000001ac  00003409 R_MIPS_GOT16      00000000   _ZTIM1Ai
000001b0  00002a0b R_MIPS_CALL16     00000000   _Z6expectiRKSt9type_in
000001dc  00003509 R_MIPS_GOT16      00000000   _ZTIPM1Ai
000001e0  00002a0b R_MIPS_CALL16     00000000   _Z6expectiRKSt9type_in
0000020c  00001409 R_MIPS_GOT16      00000000   .data.rel.ro
00000210  00002a0b R_MIPS_CALL16     00000000   _Z6expectiRKSt9type_in
0000023c  00001409 R_MIPS_GOT16      00000000   .data.rel.ro
00000240  00002a0b R_MIPS_CALL16     00000000   _Z6expectiRKSt9type_in
0000026c  00001409 R_MIPS_GOT16      00000000   .data.rel.ro
00000270  00002a0b R_MIPS_CALL16     00000000   _Z6expectiRKSt9type_in
0000029c  00001409 R_MIPS_GOT16      00000000   .data.rel.ro
000002a0  00002a0b R_MIPS_CALL16     00000000   _Z6expectiRKSt9type_in
000002cc  00001409 R_MIPS_GOT16      00000000   .data.rel.ro
000002d0  00002a0b R_MIPS_CALL16     00000000   _Z6expectiRKSt9type_in
000002fc  00001409 R_MIPS_GOT16      00000000   .data.rel.ro
00000300  00002a0b R_MIPS_CALL16     00000000   _Z6expectiRKSt9type_in
0000032c  00001409 R_MIPS_GOT16      00000000   .data.rel.ro
00000330  00002a0b R_MIPS_CALL16     00000000   _Z6expectiRKSt9type_in
0000035c  00001409 R_MIPS_GOT16      00000000   .data.rel.ro
00000360  00002a0b R_MIPS_CALL16     00000000   _Z6expectiRKSt9type_in
.
.
.

The symptom is all of the "R_MIPS_GOT16 00000000 .data.rel.ro" relocations. They should all be something similar to _ZTIM1Ai _ZTIPM1Ai, etc

Has anybody seen this before?

What is the solution?

Thanks in advance

David Daney.


	.file	1 "ptrflags.ii"
	.section .mdebug.abi32
	.previous
	.abicalls
	.text
	.align	2
	.globl	_Z6expectiRKSt9type_info
	.ent	_Z6expectiRKSt9type_info
	.type	_Z6expectiRKSt9type_info, @function
_Z6expectiRKSt9type_info:
$LFB54:
	.frame	$fp,48,$31		# vars= 16, regs= 2/0, args= 16, gp= 8
	.mask	0xc0000000,-4
	.fmask	0x00000000,0
	.set	noreorder
	.cpload	$25
	.set	nomacro
	
	addiu	$sp,$sp,-48
$LCFI0:
	sw	$31,44($sp)
$LCFI1:
	sw	$fp,40($sp)
$LCFI2:
	move	$fp,$sp
$LCFI3:
	.cprestore	16
	sw	$4,48($fp)
	sw	$5,52($fp)
	lw	$2,52($fp)
	bne	$2,$0,$L2
	nop

	sw	$0,32($fp)
	b	$L3
	nop

$L2:
	lw	$25,%call16(__dynamic_cast)($28)
	lw	$4,52($fp)
	lw	$5,%got(_ZTISt9type_info)($28)
	lw	$6,%got(_ZTIN10__cxxabiv117__pbase_type_infoE)($28)
	move	$7,$0
	jalr	$25
	nop

	lw	$28,16($fp)
	sw	$2,32($fp)
$L3:
	lw	$2,32($fp)
	sw	$2,24($fp)
	lw	$2,24($fp)
	bne	$2,$0,$L4
	nop

	sw	$0,28($fp)
	b	$L1
	nop

$L4:
	lw	$2,24($fp)
	lw	$3,8($2)
	lw	$2,48($fp)
	beq	$3,$2,$L5
	nop

	sw	$0,28($fp)
	b	$L1
	nop

$L5:
	li	$2,1			# 0x1
	sw	$2,28($fp)
$L1:
	lw	$2,28($fp)
	move	$sp,$fp
	lw	$31,44($sp)
	lw	$fp,40($sp)
	addiu	$sp,$sp,48
	j	$31
	nop

	.set	macro
	.set	reorder
$LFE54:
	.end	_Z6expectiRKSt9type_info
	.align	2
	.globl	main
	.ent	main
	.type	main, @function
main:
$LFB55:
	.frame	$fp,40,$31		# vars= 8, regs= 2/0, args= 16, gp= 8
	.mask	0xc0000000,-4
	.fmask	0x00000000,0
	.set	noreorder
	.cpload	$25
	.set	nomacro
	
	addiu	$sp,$sp,-40
$LCFI4:
	sw	$31,36($sp)
$LCFI5:
	sw	$fp,32($sp)
$LCFI6:
	move	$fp,$sp
$LCFI7:
	.cprestore	16
	move	$4,$0
	lw	$5,%got(_ZTIP1A)($28)
	lw	$25,%call16(_Z6expectiRKSt9type_info)($28)
	jalr	$25
	nop

	lw	$28,16($fp)
	bne	$2,$0,$L7
	nop

	li	$2,1			# 0x1
	sw	$2,24($fp)
	b	$L6
	nop

$L7:
	li	$4,1			# 0x1
	lw	$5,%got(_ZTIPK1A)($28)
	lw	$25,%call16(_Z6expectiRKSt9type_info)($28)
	jalr	$25
	nop

	lw	$28,16($fp)
	bne	$2,$0,$L8
	nop

	li	$2,2			# 0x2
	sw	$2,24($fp)
	b	$L6
	nop

$L8:
	li	$4,2			# 0x2
	lw	$5,%got(_ZTIPV1A)($28)
	lw	$25,%call16(_Z6expectiRKSt9type_info)($28)
	jalr	$25
	nop

	lw	$28,16($fp)
	bne	$2,$0,$L9
	nop

	li	$2,3			# 0x3
	sw	$2,24($fp)
	b	$L6
	nop

$L9:
	li	$4,4			# 0x4
	lw	$5,%got(_ZTIPrP1A)($28)
	lw	$25,%call16(_Z6expectiRKSt9type_info)($28)
	jalr	$25
	nop

	lw	$28,16($fp)
	bne	$2,$0,$L10
	nop

	li	$2,4			# 0x4
	sw	$2,24($fp)
	b	$L6
	nop

$L10:
	move	$4,$0
	lw	$5,%got(_ZTIM1Ai)($28)
	lw	$25,%call16(_Z6expectiRKSt9type_info)($28)
	jalr	$25
	nop

	lw	$28,16($fp)
	bne	$2,$0,$L11
	nop

	li	$2,5			# 0x5
	sw	$2,24($fp)
	b	$L6
	nop

$L11:
	move	$4,$0
	lw	$5,%got(_ZTIPM1Ai)($28)
	lw	$25,%call16(_Z6expectiRKSt9type_info)($28)
	jalr	$25
	nop

	lw	$28,16($fp)
	bne	$2,$0,$L12
	nop

	li	$2,6			# 0x6
	sw	$2,24($fp)
	b	$L6
	nop

$L12:
	li	$4,8			# 0x8
	lw	$5,%got(_ZTIP1B)($28)
	lw	$25,%call16(_Z6expectiRKSt9type_info)($28)
	jalr	$25
	nop

	lw	$28,16($fp)
	bne	$2,$0,$L13
	nop

	li	$2,11			# 0xb
	sw	$2,24($fp)
	b	$L6
	nop

$L13:
	li	$4,9			# 0x9
	lw	$5,%got(_ZTIPK1B)($28)
	lw	$25,%call16(_Z6expectiRKSt9type_info)($28)
	jalr	$25
	nop

	lw	$28,16($fp)
	bne	$2,$0,$L14
	nop

	li	$2,12			# 0xc
	sw	$2,24($fp)
	b	$L6
	nop

$L14:
	li	$4,10			# 0xa
	lw	$5,%got(_ZTIPV1B)($28)
	lw	$25,%call16(_Z6expectiRKSt9type_info)($28)
	jalr	$25
	nop

	lw	$28,16($fp)
	bne	$2,$0,$L15
	nop

	li	$2,13			# 0xd
	sw	$2,24($fp)
	b	$L6
	nop

$L15:
	li	$4,12			# 0xc
	lw	$5,%got(_ZTIPrP1B)($28)
	lw	$25,%call16(_Z6expectiRKSt9type_info)($28)
	jalr	$25
	nop

	lw	$28,16($fp)
	bne	$2,$0,$L16
	nop

	li	$2,14			# 0xe
	sw	$2,24($fp)
	b	$L6
	nop

$L16:
	li	$4,16			# 0x10
	lw	$5,%got(_ZTIM1Bi)($28)
	lw	$25,%call16(_Z6expectiRKSt9type_info)($28)
	jalr	$25
	nop

	lw	$28,16($fp)
	bne	$2,$0,$L17
	nop

	li	$2,15			# 0xf
	sw	$2,24($fp)
	b	$L6
	nop

$L17:
	li	$4,8			# 0x8
	lw	$5,%got(_ZTIPM1Bi)($28)
	lw	$25,%call16(_Z6expectiRKSt9type_info)($28)
	jalr	$25
	nop

	lw	$28,16($fp)
	bne	$2,$0,$L18
	nop

	li	$2,16			# 0x10
	sw	$2,24($fp)
	b	$L6
	nop

$L18:
	li	$4,8			# 0x8
	lw	$5,%got(_ZTIM1A1B)($28)
	lw	$25,%call16(_Z6expectiRKSt9type_info)($28)
	jalr	$25
	nop

	lw	$28,16($fp)
	bne	$2,$0,$L19
	nop

	li	$2,17			# 0x11
	sw	$2,24($fp)
	b	$L6
	nop

$L19:
	li	$4,24			# 0x18
	lw	$5,%got(_ZTIM1BS_)($28)
	lw	$25,%call16(_Z6expectiRKSt9type_info)($28)
	jalr	$25
	nop

	lw	$28,16($fp)
	bne	$2,$0,$L20
	nop

	li	$2,18			# 0x12
	sw	$2,24($fp)
	b	$L6
	nop

$L20:
	sw	$0,24($fp)
$L6:
	lw	$2,24($fp)
	move	$sp,$fp
	lw	$31,36($sp)
	lw	$fp,32($sp)
	addiu	$sp,$sp,40
	j	$31
	nop

	.set	macro
	.set	reorder
$LFE55:
	.end	main
	.weak	_ZTIP1A
	.section	.gnu.linkonce.d._ZTIP1A,"aw",@progbits
	.align	2
	.type	_ZTIP1A, @object
	.size	_ZTIP1A, 16
_ZTIP1A:
	.word	_ZTVN10__cxxabiv119__pointer_type_infoE+8
	.word	_ZTSP1A
	.word	0
	.word	_ZTI1A
	.weak	_ZTIPK1A
	.section	.gnu.linkonce.d._ZTIPK1A,"aw",@progbits
	.align	2
	.type	_ZTIPK1A, @object
	.size	_ZTIPK1A, 16
_ZTIPK1A:
	.word	_ZTVN10__cxxabiv119__pointer_type_infoE+8
	.word	_ZTSPK1A
	.word	1
	.word	_ZTI1A
	.weak	_ZTIPV1A
	.section	.gnu.linkonce.d._ZTIPV1A,"aw",@progbits
	.align	2
	.type	_ZTIPV1A, @object
	.size	_ZTIPV1A, 16
_ZTIPV1A:
	.word	_ZTVN10__cxxabiv119__pointer_type_infoE+8
	.word	_ZTSPV1A
	.word	2
	.word	_ZTI1A
	.weak	_ZTIPrP1A
	.section	.gnu.linkonce.d._ZTIPrP1A,"aw",@progbits
	.align	2
	.type	_ZTIPrP1A, @object
	.size	_ZTIPrP1A, 16
_ZTIPrP1A:
	.word	_ZTVN10__cxxabiv119__pointer_type_infoE+8
	.word	_ZTSPrP1A
	.word	4
	.word	_ZTIP1A
	.weak	_ZTIM1Ai
	.section	.gnu.linkonce.d._ZTIM1Ai,"aw",@progbits
	.align	2
	.type	_ZTIM1Ai, @object
	.size	_ZTIM1Ai, 20
_ZTIM1Ai:
	.word	_ZTVN10__cxxabiv129__pointer_to_member_type_infoE+8
	.word	_ZTSM1Ai
	.word	0
	.word	_ZTIi
	.word	_ZTI1A
	.weak	_ZTIPM1Ai
	.section	.gnu.linkonce.d._ZTIPM1Ai,"aw",@progbits
	.align	2
	.type	_ZTIPM1Ai, @object
	.size	_ZTIPM1Ai, 16
_ZTIPM1Ai:
	.word	_ZTVN10__cxxabiv119__pointer_type_infoE+8
	.word	_ZTSPM1Ai
	.word	0
	.word	_ZTIM1Ai
	.section	.data.rel.ro,"aw",@progbits
	.align	2
	.type	_ZTIP1B, @object
	.size	_ZTIP1B, 16
_ZTIP1B:
	.word	_ZTVN10__cxxabiv119__pointer_type_infoE+8
	.word	_ZTSP1B
	.word	8
	.word	_ZTI1B
	.align	2
	.type	_ZTIPK1B, @object
	.size	_ZTIPK1B, 16
_ZTIPK1B:
	.word	_ZTVN10__cxxabiv119__pointer_type_infoE+8
	.word	_ZTSPK1B
	.word	9
	.word	_ZTI1B
	.align	2
	.type	_ZTIPV1B, @object
	.size	_ZTIPV1B, 16
_ZTIPV1B:
	.word	_ZTVN10__cxxabiv119__pointer_type_infoE+8
	.word	_ZTSPV1B
	.word	10
	.word	_ZTI1B
	.align	2
	.type	_ZTIPrP1B, @object
	.size	_ZTIPrP1B, 16
_ZTIPrP1B:
	.word	_ZTVN10__cxxabiv119__pointer_type_infoE+8
	.word	_ZTSPrP1B
	.word	12
	.word	_ZTIP1B
	.align	2
	.type	_ZTIM1Bi, @object
	.size	_ZTIM1Bi, 20
_ZTIM1Bi:
	.word	_ZTVN10__cxxabiv129__pointer_to_member_type_infoE+8
	.word	_ZTSM1Bi
	.word	16
	.word	_ZTIi
	.word	_ZTI1B
	.align	2
	.type	_ZTIPM1Bi, @object
	.size	_ZTIPM1Bi, 16
_ZTIPM1Bi:
	.word	_ZTVN10__cxxabiv119__pointer_type_infoE+8
	.word	_ZTSPM1Bi
	.word	8
	.word	_ZTIM1Bi
	.align	2
	.type	_ZTIM1A1B, @object
	.size	_ZTIM1A1B, 20
_ZTIM1A1B:
	.word	_ZTVN10__cxxabiv129__pointer_to_member_type_infoE+8
	.word	_ZTSM1A1B
	.word	8
	.word	_ZTI1B
	.word	_ZTI1A
	.align	2
	.type	_ZTIM1BS_, @object
	.size	_ZTIM1BS_, 20
_ZTIM1BS_:
	.word	_ZTVN10__cxxabiv129__pointer_to_member_type_infoE+8
	.word	_ZTSM1BS_
	.word	24
	.word	_ZTI1B
	.word	_ZTI1B
	.weak	_ZTSP1A
	.section	.gnu.linkonce.r._ZTSP1A,"a",@progbits
	.align	2
	.type	_ZTSP1A, @object
	.size	_ZTSP1A, 4
_ZTSP1A:
	.ascii	"P1A\000"
	.weak	_ZTSPK1A
	.section	.gnu.linkonce.r._ZTSPK1A,"a",@progbits
	.align	2
	.type	_ZTSPK1A, @object
	.size	_ZTSPK1A, 5
_ZTSPK1A:
	.ascii	"PK1A\000"
	.weak	_ZTSPV1A
	.section	.gnu.linkonce.r._ZTSPV1A,"a",@progbits
	.align	2
	.type	_ZTSPV1A, @object
	.size	_ZTSPV1A, 5
_ZTSPV1A:
	.ascii	"PV1A\000"
	.weak	_ZTSPrP1A
	.section	.gnu.linkonce.r._ZTSPrP1A,"a",@progbits
	.align	2
	.type	_ZTSPrP1A, @object
	.size	_ZTSPrP1A, 6
_ZTSPrP1A:
	.ascii	"PrP1A\000"
	.weak	_ZTSM1Ai
	.section	.gnu.linkonce.r._ZTSM1Ai,"a",@progbits
	.align	2
	.type	_ZTSM1Ai, @object
	.size	_ZTSM1Ai, 5
_ZTSM1Ai:
	.ascii	"M1Ai\000"
	.weak	_ZTSPM1Ai
	.section	.gnu.linkonce.r._ZTSPM1Ai,"a",@progbits
	.align	2
	.type	_ZTSPM1Ai, @object
	.size	_ZTSPM1Ai, 6
_ZTSPM1Ai:
	.ascii	"PM1Ai\000"
	.weak	_ZTSP1B
	.section	.gnu.linkonce.r._ZTSP1B,"a",@progbits
	.align	2
	.type	_ZTSP1B, @object
	.size	_ZTSP1B, 4
_ZTSP1B:
	.ascii	"P1B\000"
	.weak	_ZTSPK1B
	.section	.gnu.linkonce.r._ZTSPK1B,"a",@progbits
	.align	2
	.type	_ZTSPK1B, @object
	.size	_ZTSPK1B, 5
_ZTSPK1B:
	.ascii	"PK1B\000"
	.weak	_ZTSPV1B
	.section	.gnu.linkonce.r._ZTSPV1B,"a",@progbits
	.align	2
	.type	_ZTSPV1B, @object
	.size	_ZTSPV1B, 5
_ZTSPV1B:
	.ascii	"PV1B\000"
	.weak	_ZTSPrP1B
	.section	.gnu.linkonce.r._ZTSPrP1B,"a",@progbits
	.align	2
	.type	_ZTSPrP1B, @object
	.size	_ZTSPrP1B, 6
_ZTSPrP1B:
	.ascii	"PrP1B\000"
	.weak	_ZTSM1Bi
	.section	.gnu.linkonce.r._ZTSM1Bi,"a",@progbits
	.align	2
	.type	_ZTSM1Bi, @object
	.size	_ZTSM1Bi, 5
_ZTSM1Bi:
	.ascii	"M1Bi\000"
	.weak	_ZTSPM1Bi
	.section	.gnu.linkonce.r._ZTSPM1Bi,"a",@progbits
	.align	2
	.type	_ZTSPM1Bi, @object
	.size	_ZTSPM1Bi, 6
_ZTSPM1Bi:
	.ascii	"PM1Bi\000"
	.weak	_ZTSM1A1B
	.section	.gnu.linkonce.r._ZTSM1A1B,"a",@progbits
	.align	2
	.type	_ZTSM1A1B, @object
	.size	_ZTSM1A1B, 6
_ZTSM1A1B:
	.ascii	"M1A1B\000"
	.weak	_ZTSM1BS_
	.section	.gnu.linkonce.r._ZTSM1BS_,"a",@progbits
	.align	2
	.type	_ZTSM1BS_, @object
	.size	_ZTSM1BS_, 6
_ZTSM1BS_:
	.ascii	"M1BS_\000"
	.weak	_ZTI1A
	.section	.gnu.linkonce.d._ZTI1A,"aw",@progbits
	.align	2
	.type	_ZTI1A, @object
	.size	_ZTI1A, 8
_ZTI1A:
	.word	_ZTVN10__cxxabiv117__class_type_infoE+8
	.word	_ZTS1A
	.section	.data.rel.ro
	.align	2
	.type	_ZTI1B, @object
	.size	_ZTI1B, 8
_ZTI1B:
	.word	_ZTVN10__cxxabiv117__class_type_infoE+8
	.word	_ZTS1B
	.weak	_ZTS1A
	.section	.gnu.linkonce.r._ZTS1A,"a",@progbits
	.align	2
	.type	_ZTS1A, @object
	.size	_ZTS1A, 3
_ZTS1A:
	.ascii	"1A\000"
	.weak	_ZTS1B
	.section	.gnu.linkonce.r._ZTS1B,"a",@progbits
	.align	2
	.type	_ZTS1B, @object
	.size	_ZTS1B, 3
_ZTS1B:
	.ascii	"1B\000"
	.ident	"GCC: (GNU) 3.4 20031105 (experimental)"

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]