Re: V4 [PATCH 3/3] Require .init_array/.fini_array support for SHF_GNU_RETAIN

2020-12-15 Thread Jeff Law via Gcc-patches
On 12/15/20 10:30 AM, H.J. Lu wrote: > Since SHF_GNU_RETAIN support doesn't work for crtstuff.c which switches > the output section directly with asm statement: > > --- > static void __attribute__((used)) > __do_global_dtors_aux (void) > { > static _Bool completed; > > if (__builtin_expect (

V4 [PATCH 3/3] Require .init_array/.fini_array support for SHF_GNU_RETAIN

2020-12-15 Thread H.J. Lu via Gcc-patches
Since SHF_GNU_RETAIN support doesn't work for crtstuff.c which switches the output section directly with asm statement: --- static void __attribute__((used)) __do_global_dtors_aux (void) { static _Bool completed; if (__builtin_expect (completed, 0)) return; completed = 1; } static void