diff options
Diffstat (limited to 'apply_patches.sh')
| -rwxr-xr-x | apply_patches.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/apply_patches.sh b/apply_patches.sh index 8013c9d..be83bfb 100755 --- a/apply_patches.sh +++ b/apply_patches.sh @@ -46,6 +46,19 @@ then fi git submodule init git submodule update --init --recursive --force + +find . -name "*.S" -o -name "*.s" -type f | while read -r file; do + if ! grep -q "\.note\.GNU-stack" "$file"; then + echo "Adding conditional .note.GNU-stack section to: $file" + echo "" >> "$file" + echo "#ifdef __linux__" >> "$file" + echo ".section .note.GNU-stack,\"\",@progbits" >> "$file" + echo "#endif" >> "$file" + git add "$file" || true + fi +done +git commit -m "Add .note.GNU-stack section to assembly files" + git am -3 <<EOF From e56dd6cd0fb1a5e55d3cb08691edf24b26d65299 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto <cyjan@mrcyjanek.net> |
