[patch] Use private linkage for remaining GlobalVariables with private names.

John McCall rjmccall at apple.com
Wed Mar 5 15:48:30 PST 2014


On Feb 27, 2014, at 2:19 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
> This patch changes the remaining GlobalVariables using "\01L" and
> "\01l" prefixes to use private linkage. What is strange about them is
> that they currently use WeakAnyLinkage. There is no comment stating
> why and that is really odd since the symbols are completely hidden, so
> it doesn't make sense for them to be weak.
> 
> Clang revisions like r63329, r63408, r63770, r65761 set the linkage to
> weak, but don't say why. I suspect they were just copying llvm-gcc.
> 
> In llvm-gcc I found r58599 and r56322 that set DECL_WEAK, but they
> were just syncing from the apple gcc. I am not exactly sure what that
> means, since the last commit to
> svn://gcc.gnu.org/svn/gcc/branches/apple was in 2006, 2 years earlier.
> 
> In summary, I have no idea why weak linkage is being used :-(

Not sure either!  Let’s try without it and see.

> I did try building chromium with this patch and it works. I am sending
> this email with it :-)

Sounds fine to me.

John.



More information about the cfe-commits mailing list