Skip to content

Commit

Permalink
Add gnu-stack notes
Browse files Browse the repository at this point in the history
In binutils-2.39, GNU ld has added a warning when linking objects that
don't have a .note.GNU-stack section.  Since we build with
"--fatal-warnings", this causes a failure:

ld: warning: cert.o: missing .note.GNU-stack section implies executable stack
ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker

This patch adds those sections to all of the .S files, so that they will
be in the objects, as well as updating our gnu-efi tree the same way.

Signed-off-by: Peter Jones <[email protected]>
  • Loading branch information
vathpela authored and jsetje committed Jun 23, 2023
1 parent 89d25a1 commit 118ff87
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions cert.S
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ vendor_deauthorized:
#endif
.Lvendor_deauthorized_end:
.Lcert_table_end:
.section .note.GNU-stack,"a"
1 change: 1 addition & 0 deletions sbat_var.S
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ sbat_var_payload_header:
.Lsbat_var_latest:
.ascii SBAT_VAR_LATEST
.byte 0
.section .note.GNU-stack,"a"

0 comments on commit 118ff87

Please sign in to comment.