From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) by sourceware.org (Postfix) with ESMTPS id 857BA3858D28 for ; Thu, 25 Jan 2024 16:13:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 857BA3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 857BA3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::22f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706199207; cv=none; b=lzgcsOGnPb0P18G/OG1E0zsA6YcyX2xAhMUOep6ULA+OciGzakv9CHgVfrrKsEVDswY9CGThkMc+X6KB2QWyRRf83En1WxmRQO8kADR/cSb8FqNYyyIlz2WVzJ33ihZq8T+ZTo9ARh2kW57JyZGgtT7S1TY/TvV7ItUmxdLJ9rU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706199207; c=relaxed/simple; bh=QiSKbm0/YtOAHPWapRkjCR88lYfp9dUJ+o4lPVsOdQ0=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=UgBN3CN6Z9Ob1Eql3YAajkhdpycxvWZRsgHd3lXV0FwV8U5pDS9ZCuKFGWIOzWYSs/FujIn3LuffXurHjkEvVQCCDF3bEP0GCXZhdGQDcVaxkTyMyl0yRhLyovCRmNIR/vtebSksmYuNWt7NRtaikDviB1hixdDV1KON0sIq8c0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x22f.google.com with SMTP id 5614622812f47-3bd72353d9fso5406395b6e.3 for ; Thu, 25 Jan 2024 08:13:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706199205; x=1706804005; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OhM56fViilA4hvBLMu8c1J9EmRBDgoj2OwfXDLz72n0=; b=Fk9+4Q+Oa5eL4LwEPrZgXtYMB65eV4hImm0y0N7U408AadNx/5jKDpnK0HHvgk7uHI BwfniGhsSaj1AJCylmCzFdvQ+ZNaTbqiuEB7bCcyR8r7ASLaP4PBsRtu+gMc0Cq+R0wo P8a6R8QMLq4hSulwBJIdkj3GiYIIpOyy7hKyDwEJmpCoSKXOctZb4jcMKCgVXU4bYQZG rxVdFO4unXxPyPV7UyTP6DIgrJDRJCpNt2EqUtE268c9OfCHmpSJqANxYEhnkgUmN9AX Sd9jMXddvTxU05lv9Zl4L9n/wus3PPbltYMn6TtAbAxUDksz8XHnJLZShWKCCtl5csVM oyng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706199205; x=1706804005; h=content-transfer-encoding:cc: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=OhM56fViilA4hvBLMu8c1J9EmRBDgoj2OwfXDLz72n0=; b=t45yu0JrLkgqEAB45adGFbdMYvSP02zkUs+jt6P7JXp/OmDlhrSPZz6shOJbaXrQdP o3TvOlBUxIxoXA4iZDLY59bsMAz+xPP0TtdzS7KM/K3FcLYzaRC9nhXjflr3lNkYQz4g Xmg+6cAGePfQGfNaPihyo8esK4Sr/n8fMw+vx6VtVVTTmKeawpWIetqG46L84sctT2Qo TWbbiyBcuCE0OBill/TPaNtJ2AvFnLJJDDSgaivg/8LOme1ybF67eVEccmOn5OvqNpGW rgRo0W96LhMSDTjen7nHcIBDY6ABhy5Ic0u3FeX2/c7MvQ5sCddBJSETdzvH/6rN0ez4 oCQA== X-Gm-Message-State: AOJu0YweY4dNOBMyHzTx9GjcyHtKqEAeuFdjn5a4A6848GM/tSGguonl GSXGqd1zc11L6rI+umA33EXKv0YWJElG1Q2ZGAgQwyLTund8mJgGfsCwK9NAORnkTen0965IgAB KSkkf32W75NyTO49R0+DDq++p+qY= X-Google-Smtp-Source: AGHT+IHI/sd+tnHF9a4H/2EKDN7SsjpYwwhfUoCuBey0hlvLTOFDfoQAhfRXFT0Ia6u060zCurMZXfF1SI0F59gDeDM= X-Received: by 2002:a05:6808:2219:b0:3bd:a08d:90e1 with SMTP id bd25-20020a056808221900b003bda08d90e1mr1451524oib.43.1706199204781; Thu, 25 Jan 2024 08:13:24 -0800 (PST) MIME-Version: 1.0 References: <20240124225103.219222-1-hjl.tools@gmail.com> <7ea5e547-cdd1-4782-add8-c5c1c0511ad3@redhat.com> In-Reply-To: From: "H.J. Lu" Date: Thu, 25 Jan 2024 08:12:48 -0800 Message-ID: Subject: Re: [PATCH] ld: Improve --fatal-warnings for unknown command-line options To: Nick Clifton Cc: Jan Beulich , Fangrui Song , binutils@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3015.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 Thu, Jan 25, 2024 at 7:45=E2=80=AFAM H.J. Lu wrote= : > > On Thu, Jan 25, 2024 at 5:41=E2=80=AFAM H.J. Lu wro= te: > > > > On Thu, Jan 25, 2024 at 3:32=E2=80=AFAM Nick Clifton = wrote: > > > > > > Hi H.J. > > > > > > Thanks for taking this problem on. When I qrote my RFC I had > > > not expected anyone to care that much... > > > > > > >>> This patch queues unknown command-line option warnings and output= s queued > > > >>> command-line option warnings after all command-line options have = been > > > >>> processed so that --fatal-warnings can work for unknown command-l= ine > > > >>> options regardless of the order of --fatal-warnings. > > > >>> > > > >>> When --fatal-warnings is used, the linker message is changed from > > > >>> > > > >>> ld: warning: -z bad-option ignored > > > >>> > > > >>> to > > > >>> > > > >>> ld: error: unsupported option: -z bad-option > > > >>> > > > >>> The above also applies to "-z dynamic-undefined-weak" when the kn= own > > > >>> "-z dynamic-undefined-weak" option is ignored. > > > > > > Patch approved - with the change suggested by Fangrui: > > > > Here is the patch I am checking. I renamed pr31289-*.d to > > fatal-warnings-*.d. > > > > Need this patch: > > https://sourceware.org/pipermail/binutils/2024-January/132126.html > > to make ld to report > > $ ld -z bad-option > > reports > > ld: warning: -z bad-option ignored > ld: no input files > > instead of > > ld: no input files > Another patch is needed: https://sourceware.org/pipermail/binutils/2024-January/132130.html to xfail PR ld/31289 tests for targets which don't use standard ELF emulation since the -z option is unrecognized. --=20 H.J.