aarch64: ERRAT_NONE is not zero, so test against it
Fix aarch64 linker to correctly handle erratum workaround flags.
The aarch64 linker incorrectly applied an erratum workaround by default because the test for fix_erratum_843419 was a simple boolean check, and ERRAT_NONE is not zero. This commit modifies the tests in elfnn-aarch64.c to explicitly compare against ERRAT_NONE, ensuring the workaround is only applied when requested by the user. This prevents unnecessary link-time overhead.
In Details
The elfnn-aarch64.c file had incorrect logic for applying erratum 843419 workarounds. The fix_erratum_843419 flag was tested as a boolean, but its default value ERRAT_NONE is non-zero, causing the workaround to be enabled unconditionally. This commit corrects the tests to globals->fix_erratum_843419 != ERRAT_NONE, aligning with other erratum checks in the file and fixing PR ld/24373.
- ERRAT_NONE
- A flag indicating that no specific erratum workaround is requested. In the aarch64 linker, this value is non-zero, which caused issues when directly used in boolean comparisons.
- aarch64
- The 64-bit Arm architecture, targeted by this linker-specific fix.
- erratum
- A hardware defect or bug in a processor that requires a software workaround.