aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorClément Chigot <chigot@adacore.com>2023-10-06 13:52:38 +0200
committerClément Chigot <chigot@adacore.com>2023-10-13 16:23:39 +0200
commit1eba15a501133ec305de6c34d89f401a7afc7998 (patch)
tree1659ce2b047b659a5040575b0454d11d056c6346 /ld/emultempl
parent318d83e658773d09a0cd62f65aa3bb4bf4474a38 (diff)
downloadgdb-1eba15a501133ec305de6c34d89f401a7afc7998.zip
gdb-1eba15a501133ec305de6c34d89f401a7afc7998.tar.gz
gdb-1eba15a501133ec305de6c34d89f401a7afc7998.tar.bz2
ld: correctly handle QNX --lazy-stack without -zstack-size
The warning was skipped if -zstack-size is not provided. ld/ChangeLog: * emultempl/nto.em: Move --lazy-stack warning before missing -zstack-size skip.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/nto.em8
1 files changed, 4 insertions, 4 deletions
diff --git a/ld/emultempl/nto.em b/ld/emultempl/nto.em
index 0d319ac..b1a6133 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;