section() handling changed (or a bug was introduced)?

Mariusz Mazur mmazur@kernel.pl
Wed Oct 20 07:48:00 GMT 2004


I've got a file test.c:

volatile unsigned char __sparc32_atomic_locks[64]
  __attribute__ ((section (".gnu.linkonce.b.__sparc32_atomic_locks")));

Now I'm using gcc 3.3.5 and I generate assembler:

        .file   "test.c"
.globl __sparc32_atomic_locks
        .section        .gnu.linkonce.b.__sparc32_atomic_locks,"aw",@nobits
        .align 32
        .type   __sparc32_atomic_locks, @object
        .size   __sparc32_atomic_locks, 64
__sparc32_atomic_locks:
        .zero   64
        .section        .note.GNU-stack,"",@progbits
        .ident  "GCC: (GNU) 3.3.5 (PLD Linux)"

Looks ok. And now let's do the same thing with gcc 3.4.3 20041008:

[builder2@storm builder2]$ cat test.s
        .file   "test.c"
.globl __sparc32_atomic_locks
        .section        .bss,"awG",@nobits,.__sparc32_atomic_locks,comdat
        .align 32
        .type   __sparc32_atomic_locks, @object
        .size   __sparc32_atomic_locks, 64
__sparc32_atomic_locks:
        .zero   64
        .section        .note.GNU-stack,"",@progbits
        .ident  "GCC: (GNU) 3.4.3 20041008 (prerelease) (PLD Linux)"


Obviously the second example is broken. Is this some kind of changed syntax 
(haven't found anything about it with google) or just a plain bug?

(either way it breaks glibc build and I really need that glibc :)


-- 
In the year eighty five ten
God is gonna shake his mighty head
He'll either say,
"I'm pleased where man has been"
Or tear it down, and start again



More information about the Gcc mailing list