ld: Don't treated the fatal error as warning

Message ID CAMe9rOpAeh2qCMEKEezSn346tWRRjGDB5GCrCn_N=zH5_mp=bg@mail.gmail.com
State New
Headers
Series ld: Don't treated the fatal error as warning |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Test passed

Commit Message

H.J. Lu July 30, 2026, 7:31 a.m. UTC
  Change fatal to pass false as the is_warning argument to vfinfo so that
the fatal error message isn't treated as a warning by vfinfo.

* ldmisc.c (fatal): Pass false as the is_warning argument to
vfinfo.
  

Comments

H.J. Lu Aug. 2, 2026, 11:59 p.m. UTC | #1
On Thu, Jul 30, 2026 at 3:31 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> Change fatal to pass false as the is_warning argument to vfinfo so that
> the fatal error message isn't treated as a warning by vfinfo.
>
> * ldmisc.c (fatal): Pass false as the is_warning argument to
> vfinfo.
>

If there is no objection, I will check it in next week.
  
Maciej W. Rozycki Aug. 3, 2026, 1:12 a.m. UTC | #2
On Mon, 3 Aug 2026, H.J. Lu wrote:

> > Change fatal to pass false as the is_warning argument to vfinfo so that
> > the fatal error message isn't treated as a warning by vfinfo.
> >
> > * ldmisc.c (fatal): Pass false as the is_warning argument to
> > vfinfo.

 It seems to me like a pretty obvious fix to a typo/oversight in commit 
8d97c1a53f3d ("PR 32603, ld -w misbehaviour"), however would you please 
make a simple generic test case to cover it?

> If there is no objection, I will check it in next week.

 I don't think it works like that.

  Maciej
  
H.J. Lu Aug. 5, 2026, 9:56 p.m. UTC | #3
On Mon, Aug 3, 2026 at 7:59 AM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Thu, Jul 30, 2026 at 3:31 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > Change fatal to pass false as the is_warning argument to vfinfo so that
> > the fatal error message isn't treated as a warning by vfinfo.
> >
> > * ldmisc.c (fatal): Pass false as the is_warning argument to
> > vfinfo.
> >
>
> If there is no objection, I will check it in next week.
>
>

I am checking it in.
  
Maciej W. Rozycki Aug. 6, 2026, 10:53 a.m. UTC | #4
On Thu, 6 Aug 2026, H.J. Lu wrote:

> > > Change fatal to pass false as the is_warning argument to vfinfo so that
> > > the fatal error message isn't treated as a warning by vfinfo.
> > >
> > > * ldmisc.c (fatal): Pass false as the is_warning argument to
> > > vfinfo.
> >
> > If there is no objection, I will check it in next week.
> 
> I am checking it in.

 I did object, didn't I?

  Maciej
  

Patch

From ec113d811b7c03077e4c7e2ced552848f8271c7e Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Thu, 30 Jul 2026 15:18:42 +0800
Subject: [PATCH] ld: Don't treated the fatal error as warning

Change fatal to pass false as the is_warning argument to vfinfo so that
the fatal error message isn't treated as a warning by vfinfo.

	* ldmisc.c (fatal): Pass false as the is_warning argument to
	vfinfo.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
 ld/ldmisc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ld/ldmisc.c b/ld/ldmisc.c
index 31ca64b4ba0..efb10693076 100644
--- a/ld/ldmisc.c
+++ b/ld/ldmisc.c
@@ -661,7 +661,7 @@  fatal (const char *fmt, ...)
 
   fflush (stdout);
   va_start (arg, fmt);
-  vfinfo (stderr, fmt, arg, true);
+  vfinfo (stderr, fmt, arg, false);
   va_end (arg);
   fflush (stderr);
   xexit (1);
-- 
2.55.0