This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Add ld.gold option "--dynamic-list-only"
- From: Cary Coutant <ccoutant at google dot com>
- To: Vyacheslav Ostapenko <ostap73 at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Tue, 11 Mar 2014 10:45:30 -0700
- Subject: Re: [PATCH] Add ld.gold option "--dynamic-list-only"
- Authentication-results: sourceware.org; auth=none
- References: <CAJgOwdkGnSh3ywit_NEQdW3NxVf_q=rTqFa0gUbeMFz6ZXvQiA at mail dot gmail dot com> <CAHACq4pwdv2AxX6B4XuGLku_xOjiKzxUC6Z5mLcdZ0kfSVHfkw at mail dot gmail dot com> <CAJgOwd=0nhubZxvV9bUKdxGsuSeoK3wsZ8n51w18zBYMHeA+AA at mail dot gmail dot com>
>> Have you looked at the --exclude-libs option?
>
> Yes.
> The problem is solve-able with exclude-libs, but I had to create
> pretty long list of excluded libraries which also need to be
> maintained.
You can say --exclude-libs=ALL.
> "default-visibility" switch doesn't solve the problem. Libraries that
> are linked use "__attribute__((visibility( default )))" even for
> static builds and this way appear in export list of final shared
> library and currently there is no way to override this.
> Or do you mean "default-visibility" is the way to specify visibility
> (set default) for "__attribute__((visibility( default )))"? I think in
> this case it should look like
> "--default-visibility={internal|hidden|protected|dynamic}" to avoid
> confusion about "default/default". So, in this case I will be able to
> specify "--default-visibility=hidden" and override what is necessary
> with dynamic list, right?
Yes, that's what I meant. I included "default" in the list simply
because that (unfortunately) is the name of the visibility, and the
option should allow you to specify all four values
(--default-visibility=default would be the default, and would be a way
to cancel/override an earlier use of the option).
-cary