From: Matthias Clasen Date: Tue, 4 Jan 2022 12:51:56 +0000 (-0500) Subject: Make our stack noexec X-Git-Tag: archive/raspbian/4.6.0+ds1-4+rpi1^2~10 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=40265c928db4e00d86dc5e9ecb68081a4aa8fb2f;p=gtk4.git Make our stack noexec The change to use ld and objcopy for resources had some side-effects: it leaked a few symbols and made our stack executable. We don't want that. Use -z nonexecstack and --strip-all to avoid this. Bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/4598 Gbp-Pq: Name Make-our-stack-noexec.patch --- diff --git a/gtk/meson.build b/gtk/meson.build index 91aefe1b17..6ce2c18320 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -927,6 +927,7 @@ if not meson.is_cross_build() and build_machine.system() == 'linux' and objcopy. input : gtk_gresource, output : 'gtkresources_blob.o', command : [ld, + '-z', 'noexecstack', '-r', '-b','binary', '@INPUT@', @@ -937,6 +938,7 @@ if not meson.is_cross_build() and build_machine.system() == 'linux' and objcopy. input : gtk_resources_binary, output : 'gtkresources_blob2.o', command : [objcopy, + '--strip-all', '--add-symbol','_gtk_resource_data=.data:0', '@INPUT@', '@OUTPUT@'])