Linker drops duplicate `pep-dll` source files for AArch64 and x86_64.
The Binutils linker no longer includes redundant `pep-dll-aarch64.c` and `pep-dll-x86_64.c` source files, eliminating duplicate symbol errors during cross-comp…
The Binutils linker has removed the pep-dll-aarch64.c and pep-dll-x86_64.c files. These files were found to be duplicates of the existing pe-dll.c, causing ‘multiple definition’ errors when configuring Binutils with multiple Windows targets like x86_64-w64-mingw32 and aarch64-w64-mingw32. Their removal resolves these build issues without sacrificing functionality.
In Details
When configuring Binutils with support for multiple PE/COFF targets, specifically Windows targets (e.g., x86_64-w64-mingw32,aarch64-w64-mingw32), duplicate symbol errors were occurring. This was traced to the presence of ld/pep-dll-aarch64.c and ld/pep-dll-x86_64.c, which were identical to ld/pe-dll.c. These duplicate source files led to multiple definitions of functions like pep_dll_id_target and pep_dll_add_excludes during the linking stage of the ld executable. This commit removes the pep-dll-aarch64.c and pep-dll-x86_64.c files, as the common pe-dll.c provides all nece…
For Context
The Binutils linker (ld) is a program that takes compiled code and combines it into a final executable or library. When you set up Binutils to work with different types of computer systems, especially Windows operating systems for different architectures (like AArch64 and x86_64), you tell it which 'targets' to support. This change addresses a problem where, if you configured Binutils to support multiple Windows targets at the same time, the linker would fail to build. The error was due to having identical copies of a file, pe-dll.c, under different names (pep-dll-aarch64.c and pep-dll-x86_64.c). This led to 'multiple definition' errors, because the linker saw the same functions defined more than once. By removing the redundant copies, the build process for cross-compiling to multiple Windows targets now works correctly, without any loss of functionality.