This is an archive of the discontinued LLVM Phabricator instance.

Add import libraries to list of modules in PDB
AbandonedPublic

Authored by aganea on Jul 12 2018, 6:05 AM.

Details

Summary

This patch adds import libraries such as kernel32.dll to the list of modules stored in the PDB, similar to MSVC's link.exe.
Import libraries are first collected into a set and then output as "Import:AModuleNameHere.dll" into the list of modules in order to mimic MSVC's behaviour.

Fixes bug 36275:
https://bugs.llvm.org/show_bug.cgi?id=36275

Diff Detail

Event Timeline

aganea added a subscriber: aganea.Jul 12 2018, 7:12 AM

Updated diff to only contain formatted changes for new code.

aganea requested changes to this revision.Aug 1 2018, 2:05 PM

This will also require a test to illustrate the change.

You could probably start from /lld/trunk/test/COFF/pdb-linker-module.test and bake something along the lines, which links some .objs, then checks the result with llvm-pdbutil and FileCheck to ensure the .pdb contains indeed the expected imports.

This revision now requires changes to proceed.Aug 1 2018, 2:05 PM
aganea commandeered this revision.Mar 14 2019, 11:52 AM
aganea edited reviewers, added: stefan_reinalter; removed: aganea.

Will be closed by D54802.

aganea abandoned this revision.Apr 1 2019, 1:43 PM

Commited as part of rL357308. Many thanks again @stefan_reinalter !