Skip to content

Commit 1eba15a

Browse files
committed
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.
1 parent 318d83e commit 1eba15a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ld/emultempl/nto.em

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,16 @@ nto_add_note_section (void) {
128128
bfd_size_type h_size;
129129
bool is_update = false;
130130

131-
/* Don't create a note if none of the stack parameter have to be modified. */
132-
if (link_info.stacksize <= 0 && (link_info.execstack == link_info.noexecstack))
133-
return;
134-
135131
if (nto_lazy_stack && !link_info.stacksize)
136132
{
137133
einfo (_("%F%P: error: --lazy-stack must follow -zstack-size=<size>\n"));
138134
return;
139135
}
140136

137+
/* Don't create a note if none of the stack parameter have to be modified. */
138+
if (link_info.stacksize <= 0 && (link_info.execstack == link_info.noexecstack))
139+
return;
140+
141141
note_sec = nto_lookup_QNX_note_section(QNT_STACK);
142142
if (! note_sec)
143143
return;

0 commit comments

Comments
 (0)