This of for: GNU assembler version 2.20.1 (i386-portbld-freebsd8.0) using BFD version (GNU Binutils) 2.20.1.20100303 The following assembler file doesn't assemble correctly: .file "quadtest.s" .type globalArray,@object .data .globl globalArray .align 16 globalArray: .quad 542196645677236224 .quad -12884901888 .quad 0 .quad 542196645677236224 .size globalArray, 32 Contents of section .data: 0000 00000000 fa448607 00000000 fdff0000 .....D.......... 0010 00000000 00000000 00000000 fa448607 .............D.. It should be: Contents of section .data: 0000 00000000 fa448607 00000000 fdffffff .....D.......... 0010 00000000 00000000 00000000 fa448607 .............D.. Presumably, this also occurs on OpenBSD (version unknown)
This is a generic problem that will affect all targets built with a 32-bit bfd_vma. It is a bug in bignum handling.
Subject: Bug 11867 CVSROOT: /cvs/src Module name: src Changes by: amodra@sourceware.org 2010-08-02 13:19:44 Modified files: gas : ChangeLog expr.c read.c Log message: PR gas/11867 * expr.c (operand <'-' and '~'>): Widen bignums. (operand <'!'>): Correct bignum result and convert to O_constant. * read.c (emit_expr): Don't assert on .byte bignum. Don't display bignum truncated warning for sign extended bignums. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/ChangeLog.diff?cvsroot=src&r1=1.4217&r2=1.4218 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/expr.c.diff?cvsroot=src&r1=1.83&r2=1.84 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/read.c.diff?cvsroot=src&r1=1.166&r2=1.167
.
Fix confirmed: /usr/local/bin/as -o quadtest.o quadtest.asm objdump -s quadtest.o Contents of section .data: 0000 00000000 fa448607 00000000 fdff0000 .....D.......... 0010 00000000 00000000 00000000 fa448607 .............D.. Patched version: ~/obj/binutils-2.20/gas/as-new -o quadtest.o quadtest.asm [emeewis@jazzed]~/binutils-test>objdump -s quadtest.o Contents of section .data: 0000 00000000 fa448607 00000000 fdffffff .....D.......... 0010 00000000 00000000 00000000 fa448607 .............D..
Subject: Bug 11867 CVSROOT: /cvs/src Module name: src Changes by: hjl@sourceware.org 2010-08-02 20:10:46 Modified files: gas/testsuite : ChangeLog gas/testsuite/gas/elf: elf.exp Added files: gas/testsuite/gas/elf: data-1.d data-1.s Log message: Add a testcase for PR gas/11867. 2010-08-02 H.J. Lu <hongjiu.lu@intel.com> PR gas/11867 * gas/elf/data-1.d: New. * gas/elf/data-1.s: Likewise. * elf/elf.exp: Run data-1. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/ChangeLog.diff?cvsroot=src&r1=1.1717&r2=1.1718 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/gas/elf/data-1.d.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/gas/elf/data-1.s.diff?cvsroot=src&r1=NONE&r2=1.1 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/testsuite/gas/elf/elf.exp.diff?cvsroot=src&r1=1.61&r2=1.62