llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[lld][COFF] Fix: Merge `.drectve` sections in ObjFile::readSections

Open bitRAKE opened this issue 11 months ago • 5 comments

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.

bitRAKE avatar Mar 23 '24 05:03 bitRAKE