This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Patch to not create GOT and dynamic relocation entries for unresolved symbols with --warn-unresolved-symbols.
- From: Cary Coutant <ccoutant at gmail dot com>
- To: Sriraman Tallam <tmsriram at google dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, binutils <binutils at sourceware dot org>, Paul Pluzhnikov <ppluzhnikov at google dot com>, Rong Xu <xur at google dot com>, Brooks Moses <bmoses at google dot com>, Ollie Wild <aaw at google dot com>, David Li <davidxl at google dot com>, Teresa Johnson <tejohnson at google dot com>, Ian Lance Taylor <iant at google dot com>
- Date: Thu, 23 Apr 2015 08:09:27 -0700
- Subject: Re: Patch to not create GOT and dynamic relocation entries for unresolved symbols with --warn-unresolved-symbols.
- Authentication-results: sourceware.org; auth=none
- References: <CAAs8Hmxe3fNV-7MLyNhk_=DOaR91-s=dFw3E-cFdqCCiGxxreA at mail dot gmail dot com> <CAJimCsG4yZAA1o-_nVEWH=9DwBjQZiCwDGQzNcDa+GY_XbMwvw at mail dot gmail dot com> <CAMe9rOr4SgwoF7Y-dpFogchwqpVK5z0DyYn9S9m1ZXJdu-2U4g at mail dot gmail dot com> <CAAs8Hmw2USAPrpxucvp0oE_5kidHde1-nYz7Q-YKWzpdn+L0ow at mail dot gmail dot com> <CAJimCsFyeMN-ya9pHbg3=PCEMTa5keyBvAVev=QHk-_1zOqo3w at mail dot gmail dot com>
> + // If --weak-unresolved-symbols is set, change binding of unresolved
> + // global symbols to STB_WEAK.
> + if (parameters->options().weak_unresolved_symbols()
> + && (binding == elfcpp::STB_GLOBAL
> + || binding == elfcpp::STB_LOCAL)
>
> Why check for STB_LOCAL? Local symbols can't be unresolved. What about
> STB_GNU_UNIQUE symbols? (Perhaps that's what you meant.)
On further thought, I doubt we will see an undefined GNU_UNIQUE
symbol, and if we do, I'm not sure we should be changing it to WEAK
(unless the very next if statement converts it to GLOBAL).
-cary