Ld: Fixes Calls to strchr That Discard or Use Wrong Const Qualifiers
The linker now correctly uses const qualifiers when calling strchr to avoid warnings and potential errors.
The linker now correctly uses const qualifiers when calling strchr. This avoids warnings and potential errors related to discarding qualifiers or using the wrong qualifiers. The affected files are ld/emultempl/pe.em, ld/emultempl/pep.em, ld/emultempl/spuelf.em, and ld/ldelf.c.
In Details
This commit fixes calls to strchr that discard or use the wrong const qualifiers in the linker. The affected files are ld/emultempl/pe.em, ld/emultempl/pep.em, ld/emultempl/spuelf.em, and ld/ldelf.c. These files are specific to the linker and its emulation of different object file formats.
For Context
The linker combines compiled object files into a single executable or library. It resolves symbols and relocations, and ensures that all code and data is placed at the correct addresses. This commit fixes type errors involving const char* in the linker's source code.