Re: [PATCH 2/2] IPA symver: support visibility and static symbols.

2020-08-26 Thread H.J. Lu via Gcc-patches
On Wed, Aug 26, 2020 at 5:24 AM Martin Liška wrote: > > On 8/26/20 2:22 PM, H.J. Lu wrote: > > What is the question? > > What are the scenarios where the new syntax: > >.symver foo, foo@VERS_1, local# Change foo to a local symbol. foo is local to the file. Use it there is no global refer

Re: [PATCH 2/2] IPA symver: support visibility and static symbols.

2020-08-26 Thread Martin Liška
On 8/26/20 2:22 PM, H.J. Lu wrote: What is the question? What are the scenarios where the new syntax: .symver foo, foo@VERS_1, local# Change foo to a local symbol. .symver foo, foo@VERS_2, hidden # Change foo to a hidden symbol. is useful? Thanks, Martin

Re: [PATCH 2/2] IPA symver: support visibility and static symbols.

2020-08-26 Thread H.J. Lu via Gcc-patches
On Wed, Aug 26, 2020 at 4:34 AM Martin Liška wrote: > > On 8/26/20 1:27 PM, Jan Hubicka wrote: > >> On 8/26/20 11:22 AM, Jan Hubicka wrote: > On 8/25/20 8:46 PM, Jan Hubicka wrote: > > What will happen here with protected visibility? > > I forgot about it. Should it be mapped al

Re: [PATCH 2/2] IPA symver: support visibility and static symbols.

2020-08-26 Thread Martin Liška
On 8/26/20 1:27 PM, Jan Hubicka wrote: On 8/26/20 11:22 AM, Jan Hubicka wrote: On 8/25/20 8:46 PM, Jan Hubicka wrote: What will happen here with protected visibility? I forgot about it. Should it be mapped also to "local"? + const char *visibility = NULL; + if (!TREE_PUBLIC (origin_decl))

Re: [PATCH 2/2] IPA symver: support visibility and static symbols.

2020-08-26 Thread Jan Hubicka
> On 8/26/20 11:22 AM, Jan Hubicka wrote: > > > On 8/25/20 8:46 PM, Jan Hubicka wrote: > > > > What will happen here with protected visibility? > > > > > > I forgot about it. Should it be mapped also to "local"? > > > > > > + const char *visibility = NULL; > > > + if (!TREE_PUBLIC (origin_decl)

Re: [PATCH 2/2] IPA symver: support visibility and static symbols.

2020-08-26 Thread Martin Liška
On 8/26/20 11:22 AM, Jan Hubicka wrote: On 8/25/20 8:46 PM, Jan Hubicka wrote: What will happen here with protected visibility? I forgot about it. Should it be mapped also to "local"? + const char *visibility = NULL; + if (!TREE_PUBLIC (origin_decl)) +visibility = "remove"; + else if (

Re: [PATCH 2/2] IPA symver: support visibility and static symbols.

2020-08-26 Thread Jan Hubicka
> On 8/25/20 8:46 PM, Jan Hubicka wrote: > > What will happen here with protected visibility? > > I forgot about it. Should it be mapped also to "local"? > > + const char *visibility = NULL; > + if (!TREE_PUBLIC (origin_decl)) > +visibility = "remove"; > + else if (DECL_VISIBILITY (origin_

Re: [PATCH 2/2] IPA symver: support visibility and static symbols.

2020-08-26 Thread Martin Liška
On 8/25/20 8:46 PM, Jan Hubicka wrote: What will happen here with protected visibility? I forgot about it. Should it be mapped also to "local"? + const char *visibility = NULL; + if (!TREE_PUBLIC (origin_decl)) +visibility = "remove"; + else if (DECL_VISIBILITY (origin_decl) == VISIBILI

Re: [PATCH 2/2] IPA symver: support visibility and static symbols.

2020-08-25 Thread Jan Hubicka
> > gcc/ChangeLog: > > * cgraphunit.c (process_symver_attribute): Remove checks that > are not needed now. > (cgraph_node::assemble_thunks_and_aliases): Change second > argument to decl. > * config/elfos.h (ASM_OUTPUT_SYMVER_DIRECTIVE): Add new > VISIBILITY par

[PATCH 2/2] IPA symver: support visibility and static symbols.

2020-08-25 Thread Martin Liska
gcc/ChangeLog: * cgraphunit.c (process_symver_attribute): Remove checks that are not needed now. (cgraph_node::assemble_thunks_and_aliases): Change second argument to decl. * config/elfos.h (ASM_OUTPUT_SYMVER_DIRECTIVE): Add new VISIBILITY parameter