Rafael Espíndola via llvm-dev
2016-May-13 12:43 UTC
[llvm-dev] [RFC] Fail early on unimplementable append linkage uses
Append linkage is magical. It doesn't correspond to anything available in real object files (ELF/COFF/MachO). In those files sections are appended, but symbols are just resolved. That means that appending linkage can only be used with llvm special symbols that never hit a real .o. Long term I think we should delete it an replace with explicit use of section. But for now I would like to just error early if we try to actually put one in an object file. That is what http://reviews.llvm.org/D20179 does. Is everyone OK with that with a langref update? Cheers, Rafael
Renato Golin via llvm-dev
2016-May-13 12:51 UTC
[llvm-dev] [RFC] Fail early on unimplementable append linkage uses
On 13 May 2016 at 13:43, Rafael Espíndola <llvm-dev at lists.llvm.org> wrote:> That means that appending linkage can only be used with llvm special > symbols that never hit a real .o.So they should have been resolved by emission time, or it's a back-end error. Do you have an idea of what could be affected if we start emitting an error, here? Test-Suite, other programs? cheers, --renato
Rafael Espíndola via llvm-dev
2016-May-13 12:56 UTC
[llvm-dev] [RFC] Fail early on unimplementable append linkage uses
On 13 May 2016 at 08:51, Renato Golin <renato.golin at linaro.org> wrote:> On 13 May 2016 at 13:43, Rafael Espíndola <llvm-dev at lists.llvm.org> wrote: >> That means that appending linkage can only be used with llvm special >> symbols that never hit a real .o. > > So they should have been resolved by emission time, or it's a back-end error.Not resolved, translated. For example, llvm.ctors gets expanded to whatever form the object file uses for processing static constructors.> Do you have an idea of what could be affected if we start emitting an > error, here? Test-Suite, other programs?No. Clang only produces the well known ones. Anything producing a appending linkage global that actually got written to the output would hit a link error if it tried combining any two of those files (and can get the same behaviour with an external linkage). Cheers, Rafale
Reid Kleckner via llvm-dev
2016-May-13 15:14 UTC
[llvm-dev] [RFC] Fail early on unimplementable append linkage uses
I think appending linkage was intended to abstract over the platform-specific details of arranging a custom section with start and end symbols. Nobody ever implemented it though, so until they are implemented, rejecting them early sounds good. :) On Fri, May 13, 2016 at 5:43 AM, Rafael Espíndola <llvm-dev at lists.llvm.org> wrote:> Append linkage is magical. It doesn't correspond to anything available > in real object files (ELF/COFF/MachO). In those files sections are > appended, but symbols are just resolved. > > That means that appending linkage can only be used with llvm special > symbols that never hit a real .o. > > Long term I think we should delete it an replace with explicit use of section. > > But for now I would like to just error early if we try to actually put > one in an object file. That is what http://reviews.llvm.org/D20179 > does. Is everyone OK with that with a langref update? > > Cheers, > Rafael > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Chandler Carruth via llvm-dev
2016-May-16 00:55 UTC
[llvm-dev] [RFC] Fail early on unimplementable append linkage uses
On Fri, May 13, 2016 at 9:14 AM Reid Kleckner via llvm-dev < llvm-dev at lists.llvm.org> wrote:> I think appending linkage was intended to abstract over the > platform-specific details of arranging a custom section with start and > end symbols. Nobody ever implemented it though, so until they are > implemented, rejecting them early sounds good. :) >+1 from me> > On Fri, May 13, 2016 at 5:43 AM, Rafael Espíndola > <llvm-dev at lists.llvm.org> wrote: > > Append linkage is magical. It doesn't correspond to anything available > > in real object files (ELF/COFF/MachO). In those files sections are > > appended, but symbols are just resolved. > > > > That means that appending linkage can only be used with llvm special > > symbols that never hit a real .o. > > > > Long term I think we should delete it an replace with explicit use of > section. > > > > But for now I would like to just error early if we try to actually put > > one in an object file. That is what http://reviews.llvm.org/D20179 > > does. Is everyone OK with that with a langref update? > > > > Cheers, > > Rafael > > _______________________________________________ > > LLVM Developers mailing list > > llvm-dev at lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160516/01013b0a/attachment.html>