From: "Martin Storsjö" <martin@martin.st>
To: Mark Harmstone <mark@harmstone.com>
Cc: binutils@sourceware.org
Subject: Re: [PATCH v3 1/2] ld: Add --pdb option
Date: Tue, 11 Oct 2022 09:01:49 +0300 (EEST) [thread overview]
Message-ID: <ad963af6-9539-63f5-77e8-1dc2f92674c3@martin.st> (raw)
In-Reply-To: <20221011003702.4287-1-mark@harmstone.com>
[-- Attachment #1: Type: text/plain, Size: 409 bytes --]
On Tue, 11 Oct 2022, Mark Harmstone wrote:
> Resubmission including Martin Storsjö's amendments
> (https://sourceware.org/pipermail/binutils/2022-October/123470.html), to
> match the behaviour of lld.
Thanks! Options parsing wise, this works correctly now, but the moved code
for setting emit_build_id broke actually generating a PDB file with an
implicit name. The attached patch fixes that.
// Martin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff; name=0001-squash-ld-Fix-writing-PDB-files-with-an-implicit-nam.patch, Size: 1395 bytes --]
From 9cfa1691714c44991fc04927b85b8b17764bf388 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Tue, 11 Oct 2022 08:59:42 +0300
Subject: [PATCH] squash: ld: Fix writing PDB files with an implicit name
---
ld/emultempl/pe.em | 2 +-
ld/emultempl/pep.em | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 202e80898db..907259535b7 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -1106,7 +1106,7 @@ gld${EMULATION_NAME}_after_parse (void)
einfo (_("%P: warning: --export-dynamic is not supported for PE "
"targets, did you mean --export-all-symbols?\n"));
- if (pdb_name && emit_build_id == NULL)
+ if (pdb && emit_build_id == NULL)
emit_build_id = xstrdup (DEFAULT_BUILD_ID_STYLE);
set_entry_point ();
diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
index 6381ead9021..67280631528 100644
--- a/ld/emultempl/pep.em
+++ b/ld/emultempl/pep.em
@@ -1049,7 +1049,7 @@ gld${EMULATION_NAME}_after_parse (void)
einfo (_("%P: warning: --export-dynamic is not supported for PE+ "
"targets, did you mean --export-all-symbols?\n"));
- if (pdb_name && emit_build_id == NULL)
+ if (pdb && emit_build_id == NULL)
emit_build_id = xstrdup (DEFAULT_BUILD_ID_STYLE);
set_entry_point ();
--
2.25.1
prev parent reply other threads:[~2022-10-11 6:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-11 0:37 Mark Harmstone
2022-10-11 0:37 ` [PATCH v3 2/2] ld: Add minimal pdb generation Mark Harmstone
2022-10-11 6:01 ` Martin Storsjö [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ad963af6-9539-63f5-77e8-1dc2f92674c3@martin.st \
--to=martin@martin.st \
--cc=binutils@sourceware.org \
--cc=mark@harmstone.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).