ld-pe: Refactor code dealing with -exclude-symbols
Refactors PE linker code for handling excluded symbols to be more generic for future use.
This patch refactors the ld-pe code that handles the -exclude-symbols directive. The changes aim to make the symbol exclusion mechanism more generic, preparing it for use in related functionalities that will be implemented in subsequent commits. The core change involves restructuring data structures to accommodate a more general symbol list handling.
In Details
This patch refactors the linker's handling of symbol exclusion lists within the PE backend. It generalizes the data structure used to store excluded symbols, moving from a specific def_file_exclude_symbol structure to a more flexible def_file_symbol_list. This change is a preparatory step for upcoming modifications that will leverage this more generic structure to handle additional directives, such as -undefined symbols.
- ld-pe
- The GNU linker's backend for handling Portable Executable (PE) files, commonly used on Windows.
- -exclude-symbols
- A linker option or directive that specifies symbols to be excluded from the final output, often to prevent linking conflicts or unwanted symbols.
- DEF module-definition files
- Text files used with Windows linkers to define module properties, such as exported functions and data.
- PE
- Portable Executable, the file format used for executables, DLLs, and object code in Windows operating systems.