Re: V2 [PATCH] Use SHF_GNU_RETAIN to preserve symbol definitions

2020-12-01 Thread Jeff Law via Gcc-patches
On 11/17/20 6:20 AM, H.J. Lu via Gcc-patches wrote: > On Mon, Nov 16, 2020 at 7:59 PM Hans-Peter Nilsson wrote: >> On Fri, 13 Nov 2020, H.J. Lu via Gcc-patches wrote: >>> Done. Here is the updated patch. >> Hi. I see a test-case for this kind of construct: >> >> int foo __attribute__((__used

Re: V2 [PATCH] Use SHF_GNU_RETAIN to preserve symbol definitions

2020-11-17 Thread H.J. Lu via Gcc-patches
On Mon, Nov 16, 2020 at 7:59 PM Hans-Peter Nilsson wrote: > > On Fri, 13 Nov 2020, H.J. Lu via Gcc-patches wrote: > > Done. Here is the updated patch. > > Hi. I see a test-case for this kind of construct: > > int foo __attribute__((__used__, __section__ (".bar"))) = 42; > > and IIUC that it's h

Re: V2 [PATCH] Use SHF_GNU_RETAIN to preserve symbol definitions

2020-11-16 Thread Hans-Peter Nilsson
On Fri, 13 Nov 2020, H.J. Lu via Gcc-patches wrote: > Done. Here is the updated patch. Hi. I see a test-case for this kind of construct: int foo __attribute__((__used__, __section__ (".bar"))) = 42; and IIUC that it's handled as I'd hope (setting "R" on the named section, not another derived

V2 [PATCH] Use SHF_GNU_RETAIN to preserve symbol definitions

2020-11-13 Thread H.J. Lu via Gcc-patches
On Fri, Nov 13, 2020 at 3:36 AM Jozef Lawrynowicz wrote: > > On Thu, Nov 12, 2020 at 02:41:52PM -0800, H.J. Lu wrote: > > diff --git a/gcc/varasm.c b/gcc/varasm.c > > index 435c7b348a5..c48ef9692ee 100644 > > --- a/gcc/varasm.c > > +++ b/gcc/varasm.c > > @@ -289,6 +289,10 @@ get_section (const cha