Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2022-06-02 Thread Fāng-ruì Sòng via Gcc-patches
2021 at 7:08 PM Fāng-ruì Sòng > > > > > > wrote: > > > > > > > > > > > > > > On Tue, Sep 21, 2021 at 6:57 PM H.J. Lu > > > > > > > wrote: > > > > > > > > > > > > > > > > On Tue, Sep 21, 2021 at

Re: [PATCH] options: Make -Ofast switch off -fsemantic-interposition

2022-05-11 Thread Fāng-ruì Sòng via Gcc-patches
On Fri, Nov 19, 2021 at 9:55 AM Martin Jambor wrote: > > Hi, > > On Fri, Nov 19 2021, Jan Hubicka wrote: > >> > Hi, > >> > > >> > On Fri, Nov 12 2021, Martin Jambor wrote: > >> > > Hi, > >> > > > >> > > using -fno-semantic-interposition has been reported by various people > >> > > to bring about

Re: [PATCH v4] x86: Add -m[no-]direct-extern-access

2022-05-01 Thread Fāng-ruì Sòng via Gcc-patches
On Tue, Feb 8, 2022 at 7:05 PM H.J. Lu via Gcc-patches wrote: > > On Tue, Feb 8, 2022 at 6:38 PM Hongtao Liu wrote: > > > > On Fri, Jan 28, 2022 at 5:53 AM H.J. Lu via Gcc-patches > > wrote: > > > > > > The v3 patch was posted at > > > > > >

Re: PING^5 [PATCH v4 0/2] Implement indirect external access

2022-02-08 Thread Fāng-ruì Sòng via Gcc-patches
On Mon, Jan 3, 2022 at 7:33 PM H.J. Lu via Gcc-patches wrote: > > On Sat, Dec 11, 2021 at 10:44 AM H.J. Lu wrote: > > > > On Thu, Nov 25, 2021 at 9:54 AM H.J. Lu wrote: > > > > > > On Mon, Nov 1, 2021 at 7:02 AM H.J. Lu wrote: > > > > > > > > On Thu, Oct 21, 2021 at 12:56 PM H.J. Lu wrote: >

Re: [PATCH] elf: Add __libc_get_static_tls_bounds [BZ #16291]

2021-12-20 Thread Fāng-ruì Sòng via Gcc-patches
On Mon, Nov 29, 2021 at 11:30 AM Florian Weimer wrote: > > * Fāng-ruì Sòng: > > > PING^3 > > I think the core issue with this patch is like this: > > * I do not want to commit glibc to a public API that disallows future > changes to the way we allocate static TLS. While static TLS objects >

Re: [PATCH 3/5] gcc: Add --nostdlib++ option

2021-12-05 Thread Fāng-ruì Sòng via Gcc-patches
On Sun, Dec 5, 2021 at 6:43 AM Richard Purdie via Gcc-patches wrote: > > On Thu, 2021-12-02 at 20:04 -0700, Jeff Law wrote: > > > > On 10/28/2021 10:39 AM, Richard Purdie wrote: > > > On Thu, 2021-10-28 at 08:51 -0600, Jeff Law wrote: > > > > On 10/27/2021 2:05 PM, Richard Purdie via Gcc-patches

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-10-31 Thread Fāng-ruì Sòng via Gcc-patches
; > > On Tue, Sep 21, 2021 at 6:57 PM H.J. Lu wrote: > > > > > > > > > > > > > > On Tue, Sep 21, 2021 at 9:16 AM Uros Bizjak > > > > > > > wrote: > > > > > > > > > > > > > > > > On Mon, Sep 20, 2021 at 8:20

Re: [PATCH] elf: Add __libc_get_static_tls_bounds [BZ #16291]

2021-10-27 Thread Fāng-ruì Sòng via Gcc-patches
On Tue, Oct 19, 2021 at 12:37 PM Fāng-ruì Sòng wrote: > > On Thu, Oct 14, 2021 at 5:13 PM Fangrui Song wrote: > > > > On 2021-10-06, Fangrui Song wrote: > > >On 2021-09-27, Fangrui Song wrote: > > >>On 2021-09-27, Florian Weimer wrote: > > >>>* Fangrui Song: > > >>> > > Sanitizer runtimes

Re: [PATCH] elf: Add __libc_get_static_tls_bounds [BZ #16291]

2021-10-19 Thread Fāng-ruì Sòng via Gcc-patches
On Thu, Oct 14, 2021 at 5:13 PM Fangrui Song wrote: > > On 2021-10-06, Fangrui Song wrote: > >On 2021-09-27, Fangrui Song wrote: > >>On 2021-09-27, Florian Weimer wrote: > >>>* Fangrui Song: > >>> > Sanitizer runtimes need static TLS boundaries for a variety of use cases. > > *

Re: [PATCH] include/longlong.h: Remove incorrect lvalue to rvalue conversion from asm output constraints

2021-10-14 Thread Fāng-ruì Sòng via Gcc-patches
On 2021-10-12, Jakub Jelinek wrote: On Tue, Oct 12, 2021 at 09:21:21AM -0700, Fāng-ruì Sòng wrote: > > An output constraint takes a lvalue. While GCC happily strips the > > incorrect lvalue to rvalue conversion, Clang rejects the code by default: > > > > error: invalid use of a cast in a

Re: [PATCH] include/longlong.h: Remove incorrect lvalue to rvalue conversion from asm output constraints

2021-10-12 Thread Fāng-ruì Sòng via Gcc-patches
On Sun, Oct 10, 2021 at 10:03 PM Florian Weimer wrote: > > * Fangrui Song: > > > An output constraint takes a lvalue. While GCC happily strips the > > incorrect lvalue to rvalue conversion, Clang rejects the code by default: > > > > error: invalid use of a cast in a inline asm context

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-10-08 Thread Fāng-ruì Sòng via Gcc-patches
gt; > > On Tue, Sep 21, 2021 at 7:08 PM Fāng-ruì Sòng > > > > wrote: > > > > > > > > > > On Tue, Sep 21, 2021 at 6:57 PM H.J. Lu wrote: > > > > > > > > > > > > On Tue, Sep 21, 2021 at 9:16 AM Uros

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-09-24 Thread Fāng-ruì Sòng via Gcc-patches
> > On Tue, Sep 21, 2021 at 9:16 AM Uros Bizjak wrote: > > > > > > > > > > On Mon, Sep 20, 2021 at 8:20 PM Fāng-ruì Sòng via Gcc-patches > > > > > wrote: > > > > > > > > > > > > PING^5 > > > > >

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-09-24 Thread Fāng-ruì Sòng via Gcc-patches
On Tue, Sep 21, 2021 at 7:08 PM Fāng-ruì Sòng wrote: > > On Tue, Sep 21, 2021 at 6:57 PM H.J. Lu wrote: > > > > On Tue, Sep 21, 2021 at 9:16 AM Uros Bizjak wrote: > > > > > > On Mon, Sep 20, 2021 at 8:20 PM Fāng-ruì Sòng via Gcc-patches > > > wrot

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-09-21 Thread Fāng-ruì Sòng via Gcc-patches
On Tue, Sep 21, 2021 at 6:57 PM H.J. Lu wrote: > > On Tue, Sep 21, 2021 at 9:16 AM Uros Bizjak wrote: > > > > On Mon, Sep 20, 2021 at 8:20 PM Fāng-ruì Sòng via Gcc-patches > > wrote: > > > > > > PING^5 https://gcc.gnu.org/pipermail/gcc-patches/2021

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-09-20 Thread Fāng-ruì Sòng via Gcc-patches
PING^5 https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570139.html On Sat, Sep 4, 2021 at 12:11 PM Fāng-ruì Sòng wrote: > > PING^4 https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570139.html > > One major design goal of PIE was to avoid copy relocations. > The original patch for GCC 5

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-09-04 Thread Fāng-ruì Sòng via Gcc-patches
PING^4 https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570139.html One major design goal of PIE was to avoid copy relocations. The original patch for GCC 5 caused problems for many years. On Wed, Aug 18, 2021 at 11:54 PM Fāng-ruì Sòng wrote: > PING^3

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-08-19 Thread Fāng-ruì Sòng via Gcc-patches
PING^3 https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570139.html On Fri, Jun 4, 2021 at 3:04 PM Fāng-ruì Sòng wrote: > > PING^2 https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570139.html > > On Mon, May 24, 2021 at 9:43 AM Fāng-ruì Sòng wrote: > > > > Ping

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

2021-07-12 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: [llvm-dev] RFC: Add GNU_PROPERTY_UINT32_AND_XXX/GNU_PROPERTY_UINT32_OR_XXX

2021-06-17 Thread Fāng-ruì Sòng via Gcc
On Thu, Jun 17, 2021 at 5:24 PM H.J. Lu wrote: > > On Thu, Jun 17, 2021 at 5:06 PM Fāng-ruì Sòng wrote: > > > > On 2021-06-17, H.J. Lu wrote: > > >On Thu, Jun 17, 2021 at 1:25 PM Fāng-ruì Sòng wrote: > > >> > > >> On Thu, Jun 17, 2021 at 12:46 PM H.J. Lu wrote: > > >> > > > >> > On Thu, Jun

Re: [llvm-dev] RFC: Add GNU_PROPERTY_UINT32_AND_XXX/GNU_PROPERTY_UINT32_OR_XXX

2021-06-17 Thread Fāng-ruì Sòng via Gcc
On 2021-06-17, H.J. Lu wrote: On Thu, Jun 17, 2021 at 1:25 PM Fāng-ruì Sòng wrote: On Thu, Jun 17, 2021 at 12:46 PM H.J. Lu wrote: > > On Thu, Jun 17, 2021 at 12:38 PM Fangrui Song wrote: > > > > On 2021-06-17, H.J. Lu via llvm-dev wrote: > > >On Thu, Jan 21, 2021 at 7:02 AM H.J. Lu wrote:

Re: [llvm-dev] RFC: Add GNU_PROPERTY_UINT32_AND_XXX/GNU_PROPERTY_UINT32_OR_XXX

2021-06-17 Thread Fāng-ruì Sòng via Gcc
On Thu, Jun 17, 2021 at 12:46 PM H.J. Lu wrote: > > On Thu, Jun 17, 2021 at 12:38 PM Fangrui Song wrote: > > > > On 2021-06-17, H.J. Lu via llvm-dev wrote: > > >On Thu, Jan 21, 2021 at 7:02 AM H.J. Lu wrote: > > >> > > >> On Wed, Jan 13, 2021 at 9:06 AM H.J. Lu wrote: > > >> > > > >> > 1.

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-06-04 Thread Fāng-ruì Sòng via Gcc-patches
PING^2 https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570139.html On Mon, May 24, 2021 at 9:43 AM Fāng-ruì Sòng wrote: > > Ping https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570139.html > > On Tue, May 11, 2021 at 8:29 PM Fangrui Song wrote: > > > > This was introduced in 2014-12 to

Re: [PATCH] x86-64: Remove HAVE_LD_PIE_COPYRELOC

2021-05-24 Thread Fāng-ruì Sòng via Gcc-patches
Ping https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570139.html On Tue, May 11, 2021 at 8:29 PM Fangrui Song wrote: > > This was introduced in 2014-12 to use local binding for external symbols > for -fPIE. Now that we have H.J. Lu's GOTPCRELX for years which mostly > nullify the benefit of

Re: [PATCH v2] Add --ld-path= to specify an arbitrary executable as the linker

2020-12-16 Thread Fāng-ruì Sòng via Gcc-patches
On Fri, Dec 4, 2020 at 5:45 AM Martin Liška wrote: > > PING > > May I please ping the patch, it's waiting here for a review > for quite some time. > > Thanks, > Martin Ping. I think Martin LGTMed this patch and was waiting for a maintainer to merge it > On 7/23/20 12:17 PM, Martin Liška wrote:

Re: DWARF64 gcc/clang flag discussion

2020-11-30 Thread Fāng-ruì Sòng via Gcc
On Mon, Nov 30, 2020 at 11:36 AM Alexander Yermolovich wrote: > > Thank you David for driving the conversation, sorry I was on vacation. > > I guess discussion is from perspective of having both flags > gdwarf32/gdwarf64. In which case it's a valid question on whether they should > imply -g

Re: [PATCH] Don't make -gsplit-dwarf imply -g

2020-07-28 Thread Fāng-ruì Sòng via Gcc-patches
On Thu, May 14, 2020 at 12:16 AM Richard Biener wrote: > > On Wed, May 13, 2020 at 5:50 PM Fangrui Song wrote: > > > > On 2020-05-13, Eric Botcazou wrote: > > >> Did I mention I dislike -fsplit-dwarf? ;) > > > > > >Seconded, this will be confusing for almost all users. Since the option > >

Re: [PATCH v3] Add --ld-path= to specify an arbitrary executable as the linker

2020-07-26 Thread Fāng-ruì Sòng via Gcc-patches
On Sun, Jul 26, 2020 at 4:02 AM Andreas Schwab wrote: > > On Jul 25 2020, Fāng-ruì Sòng wrote: > > > On Sat, Jul 25, 2020 at 12:09 AM Andreas Schwab > > wrote: > >> > >> On Jul 24 2020, Fangrui Song via Gcc-patches wrote: > >> > >> > This is to mimick nearly lines. collect2 should filter out

Re: [PATCH v3] Add --ld-path= to specify an arbitrary executable as the linker

2020-07-26 Thread Fāng-ruì Sòng via Gcc-patches
On Sat, Jul 25, 2020 at 12:09 AM Andreas Schwab wrote: > > On Jul 24 2020, Fangrui Song via Gcc-patches wrote: > > > This is to mimick nearly lines. collect2 should filter out options like > > -fno-lto, -flto, -fuse-ld= before passing to ld. -f* are handled by case > > 'f'. --ld-path needs its

Re: [PATCH] Add -fld-path= to specify an arbitrary executable as the linker

2020-07-03 Thread Fāng-ruì Sòng via Gcc-patches
On 2020-07-03, Martin Liška wrote: On 7/2/20 9:34 PM, Fāng-ruì Sòng wrote: On 2020-07-01, Fāng-ruì Sòng wrote: On 2020-07-01, Martin Liška wrote: On 6/30/20 5:32 PM, Fāng-ruì Sòng wrote: There is some concern about clang's -fuse-ld=path

[PATCH] Add -fld-path= to specify an arbitrary executable as the linker

2020-07-02 Thread Fāng-ruì Sòng via Gcc-patches
On 2020-07-01, Fāng-ruì Sòng wrote: On 2020-07-01, Martin Liška wrote: On 6/30/20 5:32 PM, Fāng-ruì Sòng wrote: There is some concern about clang's -fuse-ld=path http://lists.llvm.org/pipermail/cfe-dev/2020-June/065710.html and use of COMPILER_PATH vs PATH. Shall we introduce another option

Re: [PATCH v3] Add -fuse-ld= to specify an arbitrary executable as the linker

2020-07-01 Thread Fāng-ruì Sòng via Gcc-patches
On 2020-07-01, Martin Liška wrote: On 6/30/20 5:32 PM, Fāng-ruì Sòng wrote: There is some concern about clang's -fuse-ld=path http://lists.llvm.org/pipermail/cfe-dev/2020-June/065710.html and use of COMPILER_PATH vs PATH. Shall we introduce another option like -fld-path=path (PATH is used,

Re: [PATCH v3] Add -fuse-ld= to specify an arbitrary executable as the linker

2020-06-30 Thread Fāng-ruì Sòng via Gcc-patches
There is some concern about clang's -fuse-ld=path http://lists.llvm.org/pipermail/cfe-dev/2020-June/065710.html and use of COMPILER_PATH vs PATH. Shall we introduce another option like -fld-path=path (PATH is used, COMPILER_PATH is not used)? On Tue, Jun 30, 2020 at 6:04 AM Martin Liška wrote: >

Re: [PATCH][AArch64] PR92424: Fix -fpatchable-function-entry=N,M with BTI

2020-01-21 Thread Fāng-ruì Sòng via gcc-patches
On 2020-01-21, Szabolcs Nagy wrote: On 21/01/2020 11:34, Mark Rutland wrote: Hi Szabolcs, Answers from a linux dev perspective below. thanks. On Mon, Jan 20, 2020 at 10:53:33AM +, Szabolcs Nagy wrote: i have to ask some linux developers which way they prefer: e.g.

Re: [PATCH][AArch64] PR92424: Fix -fpatchable-function-entry=N,M with BTI

2020-01-19 Thread Fāng-ruì Sòng via gcc-patches
On 2020-01-19, Fāng-ruì Sòng wrote: On 2020-01-16, Richard Sandiford wrote: Szabolcs Nagy writes: this affects the linux kernel and technically a wrong code bug so this fix tries to be backportable (fixing all issues with -fpatchable-function-entry=N,M will likely require new option). Even

Re: [PATCH][AArch64] PR92424: Fix -fpatchable-function-entry=N,M with BTI

2020-01-19 Thread Fāng-ruì Sòng via gcc-patches
On 2020-01-16, Richard Sandiford wrote: Szabolcs Nagy writes: this affects the linux kernel and technically a wrong code bug so this fix tries to be backportable (fixing all issues with -fpatchable-function-entry=N,M will likely require new option). Even for the backportable version, I think

GCC 10: Add driver options -mbranches-within-32B-boundaries and -malign-branch* for x86

2020-01-15 Thread Fāng-ruì Sòng via gcc
H.J. Lu's https://sourceware.org/ml/binutils/2019-11/msg00174.html assembler patch series added -mbranches-within-32B-boundaries and some fine-grained tuning options to GNU as, which are considered a pretty important performance mitigation of a serious CPU bug

[PATCH] Explicitly mark _S_ti() as default visibility to work around clang -fvisibility-inlines-hidden bug

2018-07-19 Thread Fāng-ruì Sòng via gcc-patches
clang (including trunk and many older versions) incorrectly marks static local variables (__tag) hidden when -fvisibility-inlines-hidden is used. % cat b.cc #include std::shared_ptr foo(int x) { return std::make_shared(x); } % g++-8 -fvisibility-inlines-hidden -fno-rtti -c b.cc % readelf -s