From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id 56A07385841F for ; Thu, 25 Jan 2024 15:43:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 56A07385841F 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 56A07385841F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::435 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706197404; cv=none; b=W17/tzP0CBs763Gpubrrw8gTumLd9KYYvtao/J/YfzVuT/sxK7g7TUF5YfFDGyDBAzfh0nx635ZhQtoUI71MCzhMYfzKlNFSlJ7QFQ99BfhYdYrLtVp7j60MInl0vmlyzLPvb1sPehhVS1L0oAUBc3ewuHzk81KWUpJ753HK51k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706197404; c=relaxed/simple; bh=3xLFNXAmdUS0aVOf5AiGE6WTbGs/ngA/hUu4kO2LLYo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=R7vTyg4VZRR8tDkwEqWphgXtR7ImyArEPLWPIVL/OCVjVH5rdYS/IfcClz0YCYvrMHpPjtqQzCGNHOT0KduobV5h0iCjy4J8bv7hLd8U9wuqZOSDcngGbk34s+Hx8ScYbnqgKTkECP7YErGxCXuc+1D+2yB4JTmqzugfkSUMB4E= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6ddc0c02665so1287959b3a.0 for ; Thu, 25 Jan 2024 07:43:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706197401; x=1706802201; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=gAjYJCs6JcNp/cjErXtk4lbBBQ1zGYBq8tHVdlnScbE=; b=hh9lX7Oy0eZNh8xpeT0KdxLhQu2/ppv3OgqO9MCoY8vr0zJ4ymZpIVKUKavkfZVC2o jFCFWcP8Sm+IFWuJoADty4f95lXQHdGyLT0IgeZcNhuUEnO2r5J8Xjhq1OaeEnvvxVO9 CgI2Eucv4m9tnDgBalbW9fENXd5m3GMqavZYl5+5MyNs2FCjEVjMym/Z09KkHjPsBH+q oAo0NMjDH9KUGIkHdltwcXQNqpjh3ftrwxVAeeS4c9mHCSkCH8tg3oXE+QxApw4JNZGr x1eeqXK5FaBLtaPo/A4H60tUj23TjnGcyJhpu8WpWmfb16SNjTEqU1axR5NiS+MaCFPp RGJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706197401; x=1706802201; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gAjYJCs6JcNp/cjErXtk4lbBBQ1zGYBq8tHVdlnScbE=; b=hdWQza31/cCf4GdrHc3c3IpsgfCsSLKPxTA51gfG4xM4BI2S2SDJ0VWXz/tAnOQXCl eKDVidVfmuQ8LlRExqQZ2LWXQbGC88YNyeTnlWXZoItxcTA+eHPFFcVr2eyiUfh11MRl ZahUQxdWZ+7SwUdMif+5zp6Rz7DBz+0hDgrVwXe8rQbpVi5Jb2kybagH8XRzcrH8ge7L UM1sd5pcxBLY1W7YaJZ9xK6TuMT0CaY2fyZp4rpiqakthPGQ850Q6ZeQXHqb/6qXVBTT IHZnTauTq/3LQp+rmsh5v0yzMGec7/MoVbBNDefiDE4vIRYiYRHFTyZxyiEYtgZAnShz 8hIg== X-Gm-Message-State: AOJu0YzLa6YqLqQpO8UeL/eAzB/8vioW1NeFtoBjD7LsVHY4SX6fu0Vy m7TzOluRORnXGqAp9VR/HcavkF2Q+CfIejmOK9hyGkD8VLYV1P+I6QvwbRXV X-Google-Smtp-Source: AGHT+IG8tNQdYnW05mA89KF+kamqRoeWWMLvQ8VW/8F9zqnKdyI2tNovneJ+CDyI69CMMLZedyi5uQ== X-Received: by 2002:a05:6a00:338d:b0:6dd:c7ea:29e with SMTP id cm13-20020a056a00338d00b006ddc7ea029emr1132084pfb.12.1706197400997; Thu, 25 Jan 2024 07:43:20 -0800 (PST) Received: from gnu-cfl-3.localdomain ([172.56.169.51]) by smtp.gmail.com with ESMTPSA id fd30-20020a056a002e9e00b006d9c0dd1b26sm16480993pfb.15.2024.01.25.07.43.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 07:43:20 -0800 (PST) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id 58F9B740298; Thu, 25 Jan 2024 07:43:19 -0800 (PST) From: "H.J. Lu" To: binutils@sourceware.org Cc: nickc@redhat.com Subject: [PATCH] ld: Always call output_unknown_cmdline_warning Date: Thu, 25 Jan 2024 07:43:19 -0800 Message-ID: <20240125154319.788647-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3024.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,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: Call output_unknown_cmdline_warning if there are no input files so that $ ld -z bad-option reports ld: warning: -z bad-option ignored ld: no input files instead of ld: no input files PR ld/31289 * ldmain.c (main): Call output_unknown_cmdline_warning if there are no input files. --- ld/ldmain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ld/ldmain.c b/ld/ldmain.c index 3b4ad144a2f..9ae541a5d82 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -471,6 +471,7 @@ main (int argc, char **argv) { if (version_printed || command_line.print_output_format) xexit (0); + output_unknown_cmdline_warnings (); einfo (_("%F%P: no input files\n")); } -- 2.43.0