bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/15938] New: --start/--end-lib renders --print-map (Archive mem


From: ppluzhnikov at google dot com
Subject: [Bug gold/15938] New: --start/--end-lib renders --print-map (Archive member included because of...) useless
Date: Sat, 07 Sep 2013 14:12:40 +0000

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

            Bug ID: 15938
           Summary: --start/--end-lib renders --print-map (Archive member
                    included because of...) useless
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ian at airs dot com
          Reporter: ppluzhnikov at google dot com
                CC: ccoutant at google dot com

When debugging linking problems, it is often useful to understand what caused a
particular file (foo.o below) to be pulled out of archive.

The --print-map output has a section which answers that, e.g.:

  Archive member included because of file (symbol)

  ./libfoo.a(foo.o)             main.o (foo)

Gold (GNU gold (GNU Binutils 2.23.52.20130907) 1.11) does not print that info
when using --start-lib foo.o --end-lib

Repro steps:

cat main.c

int foo();
int main() { return foo(); }

cat foo.c
int foo() { return 42; }


gcc -c foo.c main.c
ar ruv libfoo.a foo.o

# shows why foo.o was selected:
gcc main.o -L. -lfoo -Wl,--print-map  

# does *not* show why foo.o was selected:
gcc main.o -Wl,--start-lib foo.o --Wl,--end-lib -Wl,--print-map

-- 
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]