This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Warning: Ignoring changed section attributes for .gnu.warning.sigstack
- To: libc-alpha Mailinglist <libc-alpha at sourceware dot cygnus dot com>
- Subject: Warning: Ignoring changed section attributes for .gnu.warning.sigstack
- From: Andreas Jaeger <aj at suse dot de>
- Date: 09 Jun 2000 11:55:43 +0200
Hi,
I've noticed a small problem while compiling glibc and would welcome
your input.
The appended simple program prints a warning with gcc 2.96 CVS current:
$ /opt/gcc-2.96/bin/gcc -Wall -c test-warning.c -save-temps
test-warning.s: Assembler messages:
test-warning.s:19: Warning: Ignoring changed section attributes for .gnu.warning.sigstack
With gcc 2.95.2 everything is fine:
$ gcc -Wall -c test-warning.c
[No output at all]
The warning occurs with the current binutils CVS version.
Here's the program, it's destilled from glibc:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int sigstack (void)
{
return 0;
}
asm(".section " ".gnu.warning.""sigstack" "; .previous");
static const char __evoke_link_warning_sigstack[]
__attribute__ ((section (".gnu.warning.""sigstack")))
= "the `sigstack' function is dangerous. `sigaltstack' should be used instead.";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here's the generated assembler file:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.file "test-warning.c"
.version "01.01"
gcc2_compiled.:
.text
.align 16
.globl sigstack
.type sigstack,@function
sigstack:
pushl %ebp
movl %esp, %ebp
movl $0, %eax
popl %ebp
ret
.Lfe1:
.size sigstack,.Lfe1-sigstack
#APP
.section .gnu.warning.sigstack; .previous
#NO_APP
.section .gnu.warning.sigstack,"a",@progbits
.align 32
.type __evoke_link_warning_sigstack,@object
.size __evoke_link_warning_sigstack,77
__evoke_link_warning_sigstack:
.string "the `sigstack' function is dangerous. `sigaltstack' should be used instead."
.ident "GCC: (GNU) 2.96 20000517 (experimental)"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The important difference between gcc 2.95 and 2.96 is:
-.section .gnu.warning.sigstack,"a",@progbits
+ .section .gnu.warning.sigstack,"a",@progbits
It looks as gcc 2.96 does it right indenting the section.
But how can we silence the assembler? Does anybody know whether this
is a bug in binutils, gcc or glibc?
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de