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
Renato Golin via llvm-dev
2016-May-13 14:11 UTC
[llvm-dev] [RFC] Fail early on unimplementable append linkage uses
On 13 May 2016 at 13:56, Rafael Espíndola <rafael.espindola at gmail.com> wrote:> 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).I wonder what was the motivation to add that piece of code, then. It sounds to me that it was wrong to do that in the first place. --renato
Rafael Espíndola via llvm-dev
2016-May-13 15:09 UTC
[llvm-dev] [RFC] Fail early on unimplementable append linkage uses
On 13 May 2016 at 10:11, Renato Golin <renato.golin at linaro.org> wrote:> On 13 May 2016 at 13:56, Rafael Espíndola <rafael.espindola at gmail.com> wrote: >> 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). > > I wonder what was the motivation to add that piece of code, then. It > sounds to me that it was wrong to do that in the first place.I agree. The revisions in question seem to be r41048 and before that r8417. From reading them I think it was just a mistake about how object files work. Cheers, Rafael