aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/pe.em
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl/pe.em')
-rw-r--r--ld/emultempl/pe.em7
1 files changed, 7 insertions, 0 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index db90679..9072595 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -66,6 +66,7 @@ fragment <<EOF
#include "ldctor.h"
#include "ldbuildid.h"
#include "coff/internal.h"
+#include "pdb.h"
/* FIXME: See bfd/peXXigen.c for why we include an architecture specific
header in generic PE code. */
@@ -1353,6 +1354,12 @@ write_build_id (bfd *abfd)
if (bfd_bwrite (contents, size, abfd) != size)
return 0;
+ if (pdb)
+ {
+ if (!create_pdb_file (abfd, pdb_name, build_id))
+ return 0;
+ }
+
/* Construct the CodeView record. */
CODEVIEW_INFO cvinfo;
cvinfo.CVSignature = CVINFO_PDB70_CVSIGNATURE;