|
From: | tmsriram at google dot com |
Subject: | [Bug gold/18745] New: --start-lib --end-lib picks a weak symbol definition ahead of a strong symbol definition |
Date: | Thu, 30 Jul 2015 19:18:29 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=18745 Bug ID: 18745 Summary: --start-lib --end-lib picks a weak symbol definition ahead of a strong symbol definition Product: binutils Version: 2.26 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold Assignee: ccoutant at gmail dot com Reporter: tmsriram at google dot com CC: ian at airs dot com Target Milestone: --- Is this a bug? foo.cc #include <stdio.h> __attribute__((weak)) int foo() { printf("This is weak\n"); } int main() { foo(); } bar.cc #include <stdio.h> int foo() { printf("This is strong\n"); } $ g++ -c foo.cc bar.cc $ ld.gold --start-lib foo.o bar.o --end-lib .. $ ./a.out This is weak I would have expected the strong definition to be kept. -- You are receiving this mail because: You are on the CC list for the bug.
[Prev in Thread] | Current Thread | [Next in Thread] |