http://sourceware.org/bugzilla/show_bug.cgi?id=14861
Bug #: 14861
Summary: --gc-sections -static generates a warning with note
section
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: gold
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
On Linux/x86, I got
[hjl@gnu-tools-1 tmp]$ cat
/export/gnu/import/git/gcc-release/gcc/testsuite/gcc.dg/special/gcsec-1.c
/* AIX gld supports garbage collection. But AIX gcc does not support
-ffunction-sections or -fdata-sections. */
/* { dg-do run { xfail rs6000-*-aix* powerpc*-*-aix* } } */
/* { dg-require-gc-sections "" } */
/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections" } */
/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections -static"
{ target static } } */
#include <stdlib.h>
static int unusedint=5;
static int usedint=1;
int unused(void) {
return 1;
}
int foo(void) {
return usedint;
}
int main(void) {
if (foo())
exit(0);
else
abort();
}
[hjl@gnu-tools-1 tmp]$ gcc
/export/gnu/import/git/gcc-release/gcc/testsuite/gcc.dg/special/gcsec-1.c
-ffunction-sections -fdata-sections -Wl,--gc-sections -static
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../lib64/libc.a(fork.o)(.note.stapsdt+0x14):
warning: relocation refers to discarded section
[hjl@gnu-tools-1 tmp]$
BFD linker is OK.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils