From: "Clément Chigot" <chigot@adacore.com>
To: binutils@sourceware.org
Cc: "Clément Chigot" <chigot@adacore.com>
Subject: [PATCH 2/3] ld: correctly handle QNX --lazy-stack without -zstack-size
Date: Fri, 13 Oct 2023 10:02:47 +0200 [thread overview]
Message-ID: <20231013080248.219837-2-chigot@adacore.com> (raw)
In-Reply-To: <20231013080248.219837-1-chigot@adacore.com>
The warning was skipped if -zstack-size is not provided.
ld/ChangeLog:
* emultempl/nto.em: Move --lazy-stack warning before missing
-zstack-size skip.
---
ld/emultempl/nto.em | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/ld/emultempl/nto.em b/ld/emultempl/nto.em
index 0d319acc9bf..b1a61338412 100644
--- a/ld/emultempl/nto.em
+++ b/ld/emultempl/nto.em
@@ -128,16 +128,16 @@ nto_add_note_section (void) {
bfd_size_type h_size;
bool is_update = false;
- /* Don't create a note if none of the stack parameter have to be modified. */
- if (link_info.stacksize <= 0 && (link_info.execstack == link_info.noexecstack))
- return;
-
if (nto_lazy_stack && !link_info.stacksize)
{
einfo (_("%F%P: error: --lazy-stack must follow -zstack-size=<size>\n"));
return;
}
+ /* Don't create a note if none of the stack parameter have to be modified. */
+ if (link_info.stacksize <= 0 && (link_info.execstack == link_info.noexecstack))
+ return;
+
note_sec = nto_lookup_QNX_note_section(QNT_STACK);
if (! note_sec)
return;
--
2.25.1
next prev parent reply other threads:[~2023-10-13 8:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 8:02 [PATCH 1/3] ld: allow update of existing QNX stack note Clément Chigot
2023-10-13 8:02 ` Clément Chigot [this message]
2023-10-13 14:06 ` [PATCH 2/3] ld: correctly handle QNX --lazy-stack without -zstack-size Nick Clifton
2023-10-13 8:02 ` [PATCH 3/3] ld: warn when duplicated QNX stack note are detected Clément Chigot
2023-10-13 14:07 ` Nick Clifton
2023-10-13 14:06 ` [PATCH 1/3] ld: allow update of existing QNX stack note Nick Clifton
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=20231013080248.219837-2-chigot@adacore.com \
--to=chigot@adacore.com \
--cc=binutils@sourceware.org \
/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).