This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
x86 gas bug (.double)
- To: binutils at sourceware dot cygnus dot com
- Subject: x86 gas bug (.double)
- From: Ulrich Drepper <drepper at redhat dot com>
- Date: 05 Apr 2000 00:14:49 -0700
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
The current gas (check out this morning from the mainline CVS archive)
has a bug. It is very strange that nobody found it before. I have no
idea when it got introduced since today for the first time in months I
have tried to compile glibc.
To see the problem try:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.section .rodata
.double 1.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To see the result run objdump. This is what you should get with a
correct gas:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ objdump -s a.out
a.out: file format elf32-i386
Contents of section .text:
Contents of section .data:
Contents of section .rodata:
0000 00000000 0000f03f .......?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is what you get today.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ objdump -s a.out
a.out: file format elf32-i386
Contents of section .text:
Contents of section .data:
Contents of section .rodata:
0000 00000000 00000000 ........
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
See, the constant is 0.0 not 1.0.
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------