Fix linker error reporting for fatal errors
Ensures fatal linker errors are reported as errors, not warnings.
The GNU linker’s fatal function has been corrected to ensure that fatal errors are always treated as errors by the vfinfo reporting mechanism. Previously, a bug caused these critical messages to be misinterpreted as warnings, potentially obscuring their severity to the user. This change ensures fatal errors are properly flagged and exit with status 1.
In Details
The ldmisc.c fatal function incorrectly passed true for the is_warning argument to vfinfo. This caused the stderr output for fatal errors to be formatted as a warning, masking its severity. This commit changes the argument to false, ensuring vfinfo treats the message as a true error, leading to the expected non-zero exit code and correct diagnostic output.
- vfinfo
- A function within binutils used for formatted error and informational output. It can distinguish between warnings and fatal errors.
- fatal error
- An error condition severe enough to halt the program's execution. In the context of a linker, this typically means the program cannot be successfully linked.