bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/18596] New: hidden symbol warnings may fire even if a visible


From: danalbert at google dot com
Subject: [Bug gold/18596] New: hidden symbol warnings may fire even if a visible symbol is available
Date: Wed, 24 Jun 2015 20:52:28 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=18596

            Bug ID: 18596
           Summary: hidden symbol warnings may fire even if a visible
                    symbol is available
           Product: binutils
           Version: 2.24
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: danalbert at google dot com
                CC: ian at airs dot com
  Target Milestone: ---

Created attachment 8391
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8391&action=edit
minimized test case

Test case attached. Essentially the problem occurs when there is a symbol `foo`
that is hidden in the main executable, used in liba, and public in libb when
liba is linked before libb. Note that this does actually only occur for the
main executable; it won't happen when linking a library.

    $ make
    clang++ -fuse-ld=gold -fPIC -shared -o libbar.so bar.cpp
    clang++ -fuse-ld=gold -fPIC -shared -o libfoo.so foo.cpp -L. -lbar
    clang++ -fuse-ld=gold -Wl,--fatal-warnings -shared -o baz baz.cpp -L. -lfoo
-lbar
    /usr/bin/ld.gold: warning: hidden symbol 'foo()' in /tmp/baz-6c2f17.o is 
referenced by DSO ./libfoo.so
    /usr/bin/ld.gold: error: treating warnings as errors
    clang-3.6: error: linker command failed with exit code 1 (use -v to see
invocation)
    make: *** [baz] Error 1

`foo` is hidden in the main executable, but is public in libbar.so.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

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