llvm-project
llvm-project copied to clipboard
[lld][COFF] Fix: Merge `.drectve` sections in ObjFile::readSections
This commit addresses an issue where lld-link was not merging the contents of multiple .drectve
sections from OBJ files, unlike Microsoft's linker which merges them. Previously, lld-link would overwrite .drectve
section content, only retaining the last section's directives. This behavior led to incomplete directive processing.
This fix aligns lld-link's behavior with Microsoft's linker, improving compatibility and ensuring that all directives from object files are correctly processed.