From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by sourceware.org (Postfix) with ESMTPS id E32F03857828 for ; Thu, 25 Jan 2024 15:45:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E32F03857828 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 E32F03857828 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::b30 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706197550; cv=none; b=n7I65IdHjNpDjA6f+H30r6o+t5HKBka1zvANwbrWiPGx5wh1pYThq7V//9vYHcqMcoWS5aSXOVH3FX5KmsSO++7XzCJohQPKg4urcedPPFt43w8kulMstE77xkcKkKWU2/8+p7ulAZ97W2rPTcSo+ASdcrvkC+toAaMkxIElbJ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706197550; c=relaxed/simple; bh=ZJI4Mb7FjiA7OiWHrERSppjwivOfU6VnjVIPxTrQRlU=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=FqsGow8bbyoe60wTHyV2p2UqULYl2hgsL+kSLEh0FbjFrdbn6Gdd7sIQGp3kniWFbnI9pxAa3cistr70SgHTAUnI7+32IVxKbpLZAM+N0znJllQ0qiqFgUo5fhitNOCVcPU5PpPcjozll/7TCM7NchnfkMVm43fOakJbiubm6UI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-dc21d7a7042so6050753276.2 for ; Thu, 25 Jan 2024 07:45:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706197547; x=1706802347; 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=zdsPWOX8eSkhcRca7hO5ZFDjc0CSnW4hwF1tLFfWPZ0=; b=JRsNhCAKVpg7T35O2QNR/hwRslTAzRKjqpjqyApbws+MCfOL/6N1mWxFrXVyI+LE7U N5Gb+uinJ8OmY5sIY4+G9deUgZDWJPb22UtTL5xN4VAyN92B7HlZXXVXciNVMVWJVfXb M8BJOFSa3vNI1oMrTtQDo33be1SpO3bj2h3bhDS17YE+VkGFpPpZWo/dSj8pPM/nm7lQ bGENFZ6etUTKbnELpTfvkh1d7XAoOIzPNadIdOAqD5k2J9r8F+a6epLQ6LOYspjhMrl/ oGqKwm/3qdR+/NWkEm6u9zJtiVvrCLIu83iHN5fADixbGvPJYFBxV1gsMaUV/HPCgZoQ tYCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706197547; x=1706802347; 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=zdsPWOX8eSkhcRca7hO5ZFDjc0CSnW4hwF1tLFfWPZ0=; b=dYbo5++ucfaClrddbLFHxmvX1uXBCx+/9iI25V/tu9wFjyxf0pbqGU56XaqHlKvxHJ ern09gwsnxXYKZAhYmKmN9H4PMwL3BYm4wW+vPsQqUMFtTSXFuetXI4htc4y/G5p882E 8h+2zI/Tz5KHfDiKPQuCJo5VmtgBmArQ48vV1N8qTzBDx8wDx87fM9l2EK6fF8yJRSKI XLtyEnJ5QLkPSZrfrDj9n/FPc4SvS2AJMzlryKuafoBVwkGt1TFKB6wKOtFYkw+o2v+m eew6i6UplGFReVM8e3MPD1GB5TSS8ouowPq7pCOefGybvJttqzd1S/YNHmuCrV6hUh4b qigw== X-Gm-Message-State: AOJu0YxxnYexfqZlcGhHW89bfvhmGH3nOVrKhdq9ikrJFuDL2cgNO0sP EN8tk7GpBn6MB+a9kI8j6nUfZq8YnYs3UZFGN2ZiOreYt45diC3C2UflTWcvWu5Xu0Z9I9oYTQ/ dnlo+1H4tJBI229ocGeCLYWaorJg= X-Google-Smtp-Source: AGHT+IEwczQWf7nhvOXuP3z9PmpNF8/UdV+4BRfmZHyujxkdriydSeKlAs/gqxN9Jin4plpNKXQSQM3vKeRyla1s0sk= X-Received: by 2002:a25:86ca:0:b0:dc2:82bc:34b8 with SMTP id y10-20020a2586ca000000b00dc282bc34b8mr937059ybm.17.1706197547169; Thu, 25 Jan 2024 07:45:47 -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 07:45:11 -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=-3014.8 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 5:41=E2=80=AFAM H.J. Lu wrote= : > > On Thu, Jan 25, 2024 at 3:32=E2=80=AFAM Nick Clifton w= rote: > > > > 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 outputs = queued > > >>> command-line option warnings after all command-line options have be= en > > >>> processed so that --fatal-warnings can work for unknown command-lin= e > > >>> 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 know= n > > >>> "-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 --=20 H.J.