From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) by sourceware.org (Postfix) with ESMTPS id 4CF8F3858D3C for ; Wed, 13 Sep 2023 18:20:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4CF8F3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=google.com Received: by mail-qt1-x835.google.com with SMTP id d75a77b69052e-41513d2cca7so47111cf.0 for ; Wed, 13 Sep 2023 11:20:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1694629205; x=1695234005; darn=gcc.gnu.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=k0b17v9a8+e+tOJ9SEO6BDIhgBl1tvlgl3x30eeXrPQ=; b=LPrN7RPhnj0F6JEfzUpKRXfcj/ceP0xzwm6RsaTeb3artWIQIdFZY7oPIDaN9DqVHa eYNiLrQfG5U+0QomWlZNN8JRz4/7JEGeumcgd4qXJq8iuA8KeE9Srf+EMlAwy4FyBQ2V asK/y6FehOnHy8IzQT5PdJrmgZMl8SXS42TbTgYSL8UT9QYl/ikGZkKiQev6tzPuyHFb P72yfgLgugak9BYhw3Q+44RgUrHOCtMEDjSF0B2AE7UIxW7Vm41uF0nBtbf2G/GaEUiN QD3dfCbLsxhaqesIMexrTg103Gzhtud6kPYgybImP4rWBZR5oTDl1WqgBTn6Gx5EKzkx m/ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694629205; x=1695234005; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k0b17v9a8+e+tOJ9SEO6BDIhgBl1tvlgl3x30eeXrPQ=; b=o6fAtjOB2wLpJzZ5FYR+slAVI5WGZOr3AnwTErhKavQO/2sCP+TzzRL2LPypkwIqg4 VJnyM1zZ4A0Ev4qXM5XETbe3pE8XQX/5C6IzHRBdBVCEmeLj2b+uUt6X5nq2npizhhZ8 8bhjrj1jrISowOLUOjGVreINonAqzPGSPuJ92K02WT5WUycog2KwSgLRxTO91xRh5mve Po8kpFu+V/sG24qpppkuh3+ubjrpi+YxZ5MYV4sXcK3OdjurZVG/jHJ+jHqpDJpKuP3s pl50ldtNmtT9OaE+6RdpwC44/xaTCySDKsHHn3uKElnZVrSwptb5KlDN3VlNHmhNi7b2 GG5g== X-Gm-Message-State: AOJu0Yyyf7ApQ+989xiIpCbkqUmcKLl4nrC2Lyx4Vl8Ic4Im6sFMF3p0 NzKdTkRqUz9IH+uW/4PwcUcCqF7jMN6MfE3LAg3Ulsqx4ZiZeKnZ5HoiaQ== X-Google-Smtp-Source: AGHT+IE9NwseDUeHOq1l9SJ8odpknVo/bbXtHM1CRBdUxfMXTIsTcMCwry7kL3HfgE60yj07F1W4MPnx+lZ1Jq7xj+U= X-Received: by 2002:ac8:584c:0:b0:40f:d3db:f328 with SMTP id h12-20020ac8584c000000b0040fd3dbf328mr395055qth.2.1694629205333; Wed, 13 Sep 2023 11:20:05 -0700 (PDT) MIME-Version: 1.0 References: <20230801195104.2183011-1-maskray@google.com> In-Reply-To: From: Fangrui Song Date: Wed, 13 Sep 2023 11:19:54 -0700 Message-ID: Subject: Re: [PATCH v4] i386: Allow -mlarge-data-threshold with -mcmodel=large To: gcc-patches@gcc.gnu.org, Florian Weimer , "H.J. Lu" , Jan Beulich , Jan Hubicka , Michael Matz , Uros Bizjak Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.7 required=5.0 tests=BAYES_00,BODY_8BITS,DKIMWL_WL_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH,KAM_MANYTO,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, Aug 22, 2023 at 12:19=E2=80=AFAM Fangrui Song = wrote: > > On Tue, Aug 1, 2023 at 12:51=E2=80=AFPM Fangrui Song = wrote: > > > > When using -mcmodel=3Dmedium, large data objects larger than the > > -mlarge-data-threshold threshold are placed into large data sections > > (.lrodata, .ldata, .lbss and some variants). GNU ld and ld.lld 17 plac= e > > .l* sections into separate output sections. If small and medium code > > model object files are mixed, the .l* sections won't exert relocation > > overflow pressure on sections in object files built with -mcmodel=3Dsma= ll. > > > > However, when using -mcmodel=3Dlarge, -mlarge-data-threshold doesn't > > apply. This means that the .rodata/.data/.bss sections may exert > > relocation overflow pressure on sections in -mcmodel=3Dsmall object fil= es. > > > > This patch allows -mcmodel=3Dlarge to generate .l* sections and drops a= n > > unneeded documentation restriction that the value must be the same. > > > > Link: https://groups.google.com/g/x86-64-abi/c/jnQdJeabxiU > > ("Large data sections for the large code model") > > > > Signed-off-by: Fangrui Song > > > > --- > > Changes from v1 (https://gcc.gnu.org/pipermail/gcc-patches/2023-April/6= 16947.html): > > * Clarify commit message. Add link to https://groups.google.com/g/x86-6= 4-abi/c/jnQdJeabxiU > > > > Changes from v2 > > * Drop an uneeded limitation in the documentation. > > > > Changes from v3 > > * Change scan-assembler directives to use \. to match literal . > > --- > > gcc/config/i386/i386.cc | 15 +++++++++------ > > gcc/config/i386/i386.opt | 2 +- > > gcc/doc/invoke.texi | 6 +++--- > > gcc/testsuite/gcc.target/i386/large-data.c | 13 +++++++++++++ > > 4 files changed, 26 insertions(+), 10 deletions(-) > > create mode 100644 gcc/testsuite/gcc.target/i386/large-data.c > > > > [...] > > Ping:) Ping:) https://gcc.gnu.org/pipermail/gcc-patches/2023-August/625993.html (I don't have write access to gcc.) --=20 =E5=AE=8B=E6=96=B9=E7=9D=BF