Re: [PATCH v4] Add retain attribute to place symbols in SHF_GNU_RETAIN section

2021-02-17 Thread Jakub Jelinek via Gcc-patches
On Wed, Feb 17, 2021 at 12:04:34PM -0800, H.J. Lu wrote:> > > + /* For -fretain-used-symbol, a "used" attribute also implies "retain". */ s/-symbol/-symbols/ > + if (flag_retain_used_symbols > + && attributes > + && (TREE_CODE (*node) == FUNCTION_DECL > + || (VAR_P (*node) && T

[PATCH v4] Add retain attribute to place symbols in SHF_GNU_RETAIN section

2021-02-17 Thread H.J. Lu via Gcc-patches
ute is the same as the @code{used} attribute, except > > +for ELF targets that support the GNU or FreeBSD OSABIs, this attribute > > I'm not sure "retain" attribute should imply "used", one can always use > __attribute__((used, retain)) if one wants both. > I t