bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/11855] New: GOLD: PROVIDE: does not provide symbols only refer


From: nickc at redhat dot com
Subject: [Bug gold/11855] New: GOLD: PROVIDE: does not provide symbols only referenced in linker script
Date: 29 Jul 2010 15:13:44 -0000

Hi Guys,

  I have encountered a discrepancy between GNU LD and GOLD with regard to the
PROVIDE keyword.  If the provided symbol is not referenced in an input object
file then GOLD will not define it, even if it is referenced elsewhere in the
linker script.

  To reproduce follow these steps:

  % touch empty.c
  % gcc -c empty.c
  % cat <<EOF >provide.ld
  SECTIONS
  {
        PROVIDE (foo = 0);

        .bar :
        {
        LONG (foo);
        }
  }
  EOF

  % ld -T provide.ld empty.o
  % gold -T provide.ld empty.o
  gold: error: undefined symbol 'foo' referenced in expression

Cheers
  Nick

-- 
           Summary: GOLD: PROVIDE: does not provide symbols only referenced
                    in linker script
           Product: binutils
           Version: 2.21 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
        AssignedTo: ian at airs dot com
        ReportedBy: nickc at redhat dot com
                CC: bug-binutils at gnu dot org
 GCC build triplet: any
  GCC host triplet: any
GCC target triplet: any


http://sourceware.org/bugzilla/show_bug.cgi?id=11855

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]