PING^1 [PATCH v3 1/2] Add -f[no-]direct-extern-access

2021-08-04 Thread H.J. Lu via Gcc-patches
On Mon, Jul 12, 2021 at 5:13 AM H.J. Lu wrote: > > On Sun, Jul 11, 2021 at 11:13 PM Richard Biener > wrote: > > > > On Fri, Jul 9, 2021 at 4:50 PM H.J. Lu wrote: > > > > > > -fdirect-extern-access is the default. With -fno-direct-extern-access: > > > > > > 1. Always use GOT to access undefined

Re: [PATCH v3 1/2] Add -f[no-]direct-extern-access

2021-07-12 Thread H.J. Lu via Gcc-patches
On Sun, Jul 11, 2021 at 11:13 PM Richard Biener wrote: > > On Fri, Jul 9, 2021 at 4:50 PM H.J. Lu wrote: > > > > -fdirect-extern-access is the default. With -fno-direct-extern-access: > > > > 1. Always use GOT to access undefined data and function symbols, > >including in PIE and non-PIE. T

Re: [PATCH v3 1/2] Add -f[no-]direct-extern-access

2021-07-11 Thread Fāng-ruì Sòng via Gcc-patches
> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c > index cff26909292..7dee311051d 100644 > --- a/gcc/config/i386/i386.c > +++ b/gcc/config/i386/i386.c > @@ -10312,13 +10312,17 @@ darwin_local_data_pic (rtx disp) > } > > /* True if the function symbol operand X should be loaded from

Re: [PATCH v3 1/2] Add -f[no-]direct-extern-access

2021-07-11 Thread Richard Biener via Gcc-patches
On Fri, Jul 9, 2021 at 4:50 PM H.J. Lu wrote: > > -fdirect-extern-access is the default. With -fno-direct-extern-access: > > 1. Always use GOT to access undefined data and function symbols, >including in PIE and non-PIE. These will avoid copy relocations >in executables. This is compati

[PATCH v3 1/2] Add -f[no-]direct-extern-access

2021-07-09 Thread H.J. Lu via Gcc-patches
-fdirect-extern-access is the default. With -fno-direct-extern-access: 1. Always use GOT to access undefined data and function symbols, including in PIE and non-PIE. These will avoid copy relocations in executables. This is compatible with existing executables and shared libraries. 2.