[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/14861] New: --gc-sections -static generates a warning with not
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug gold/14861] New: --gc-sections -static generates a warning with note section |
Date: |
Tue, 20 Nov 2012 12:58:19 +0000 |
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: address@hidden
ReportedBy: address@hidden
CC: address@hidden
Classification: Unclassified
On Linux/x86, I got
address@hidden 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();
}
address@hidden 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
address@hidden 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 gold/14861] New: --gc-sections -static generates a warning with note section,
hjl.tools at gmail dot com <=