Re: [PATCH v4] Introduce attribute sym

2023-08-15 Thread Alexandre Oliva via Gcc-patches
On Jul 22, 2023, Fangrui Song wrote: > I wonder whether this attribute can be named "alias" without arguments. Erhm... Maybe I'm missing something about your suggestion, but without arguments, how would we tell the compiler the symbol name of the additional alias we want for the definition? Ma

Re: [PATCH v4] Introduce attribute sym

2023-07-21 Thread Fangrui Song via Gcc-patches
On Wed, Jul 19, 2023 at 4:12 PM Alexandre Oliva via Gcc-patches wrote: > > On Jul 18, 2023, Richard Biener wrote: > > > I think the __symver__ attribute does something similar already so > > maybe use __attribute__((__sym__("foo")))? > > Cool, thanks, that will do. Regstrapped on x86_64-linux-gn

Re: [PATCH v4] Introduce attribute sym

2023-07-21 Thread Alexandre Oliva via Gcc-patches
On Jul 20, 2023, Richard Biener wrote: > I wonder if we could have shared some of the cgraph/varasm bits > with the symver attribute handling? It's just a new 'sym' but > without the version part? Possibly. process_common_attributes could be a good place to create the alias decl, like symver d

Re: [PATCH v4] Introduce attribute sym

2023-07-20 Thread Richard Biener via Gcc-patches
On Thu, Jul 20, 2023 at 1:11 AM Alexandre Oliva wrote: > > On Jul 18, 2023, Richard Biener wrote: > > > I think the __symver__ attribute does something similar already so > > maybe use __attribute__((__sym__("foo")))? > > Cool, thanks, that will do. Regstrapped on x86_64-linux-gnu. Ok to > inst