Hi,

I recently upgraded to as(1) version 2.16.91 20060320, as distributed by
CodeSourcery for ARM, and notice differences with regards to earlier
versions of as(1) (2.16), as built by myself.  (This has caused a lot of
head scratching for me).  I can reproduce this behavior with the native
as 2.17.50 20060709, as distributed with Cygwin for x86.

Specifically, given the code

my_variable:
        .long X
        X = 1
        X = 2

the new version assembles the value 1 into my_variable, while the old
version assembles the value 2.  (Naturally, in real code, X is
determined by various macros, etc.)

I feel that 2 is the correct value for my_variable, since it is the
value of the symbol X in the object file's symbol table.

I have found the following workaround

my_variable:
        .long X1
        X = 1
        X = 2
        X1 = X

The following workaround does not work:

        .globl X
        .long X
        X = 1
        X = 2

Interestingly,

        .globl X1
        .long X1
        X = 1
        X = 2
        X1 = X

does.

I also have seen absolute symbols (which show properly in the listing
produced by -as) being suppressed in the symbol table, not showing up in
the output of nm, objdump -t or available to gdb.  However, I do not
have a test case for this.

Regards,

Konrad Schwarz
BEGIN:VCARD
VERSION:2.1
N:Schwarz;Konrad
FN:Konrad Schwarz
ORG:Siemens AG;CT SE 2
TITLE:Principal Engineer
TEL;WORK;VOICE:+49 (89) 636-53579
TEL;WORK;FAX:+49 (89) 636-45450
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;53 518;Siemens AG=0D=0ACT SE 2;M=FCnchen;;81730;Germany
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:53 518=0D=0ASiemens AG=0D=0ACT SE 2=0D=0AM=FCnchen 81730=0D=0AGermany
ADR;POSTAL;ENCODING=QUOTED-PRINTABLE:;;Siemens AG=0D=0ACT SE 2;M=FCnchen;;81730;Germany
LABEL;POSTAL;ENCODING=QUOTED-PRINTABLE:Siemens AG=0D=0ACT SE 2=0D=0AM=FCnchen 81730=0D=0AGermany
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20060130T101011Z
END:VCARD
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to