aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/pep.em
diff options
context:
space:
mode:
authorMark Harmstone <mark@harmstone.com>2022-10-17 00:24:19 +0100
committerAlan Modra <amodra@gmail.com>2022-10-20 15:22:37 +1030
commitb41a65333fc89edb418d22164c275212e32b036d (patch)
treebe6144ed139d96e08618f1750cedc6aaaa6edbe9 /ld/emultempl/pep.em
parentf6f30f347bb97898a74e59a841982170e42bb265 (diff)
downloadbinutils-b41a65333fc89edb418d22164c275212e32b036d.zip
binutils-b41a65333fc89edb418d22164c275212e32b036d.tar.gz
binutils-b41a65333fc89edb418d22164c275212e32b036d.tar.bz2
ld: Add minimal pdb generation
Diffstat (limited to 'ld/emultempl/pep.em')
-rw-r--r--ld/emultempl/pep.em7
1 files changed, 7 insertions, 0 deletions
diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
index 66cc61e..e2c538e 100644
--- a/ld/emultempl/pep.em
+++ b/ld/emultempl/pep.em
@@ -73,6 +73,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. */
@@ -1345,6 +1346,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;