[lld] r286713 - [ELF] - Add support for locals list in version script.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 16 08:48:34 PST 2016


On Wed, Nov 16, 2016 at 1:19 AM, George Rimar via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> >"local:" is special in that it is not actually part of any version.
> >Having two "local: *" will not change the result. I would then suggest
> >moving the Locals vector out of VersionDefinition and into
> >Configuration.
> >
> >Cheers,
> >Rafael
>
> After some investigations:
> 1) This change *can* affect on result in next case:
>
> Version1 {
>  global:
>   <wildcarded globals 1>
> local:
>  <wildcarded locals 1>
> }
> Version2 {
>  global:
>   <wildcarded globals 2>
> local:
>  <wildcarded locals 2>
> }
>
> If we would have single list of locals, we would process them either
> before or after lists of globals.
> In both cases that is not the same as we had, for example previously order
> was:
>
> <wildcarded locals 2>  <wildcarded globals 2>  <wildcarded locals 1>
>  <wildcarded globals 1>
>
> So after such change it will be one of 2:
> <wildcarded locals N>  <wildcarded locals N2 >   <wildcarded globals 2>
> <wildcarded globals 1>
> <wildcarded globals 2>  <wildcarded globals 1> <wildcarded locals N>
> <wildcarded locals N2 >
> That would be a deviation from GNU behavior.
>

Does it make real observable difference?


> 2) Also this will affect on error reporting. Since when we will have a
> single list of locals and do not have a maping
> local->versionN, it will be problematic to report something like "symbol
> has version X but was declared as local in version Y",
> though we can skip "in version Y" here.
>

This is not a big issue. You can still emit the same error message by
adding a new field or something.


> Now I am not sure it worth doing that, do you still in favor or doing such
> change ?
>
> Best regards,
> George.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161116/8f1e16f0/attachment.html>


More information about the llvm-commits mailing list