Skip to content

Commit c32953f

Browse files
committed
Remove the use of -use-gnu-stack when BOLTing LLVM
This flag (counterintuitively) was removing the `GNU_STACK` ELF attribute, which caused the optimized `libLLVM.so` file to be flagged as having an executable stack on SELinux.
1 parent 540a50d commit c32953f

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/bootstrap/bolt.rs

-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ pub fn optimize_with_bolt(path: &Path, profile_path: &Path, output_path: &Path)
4545
.arg("-split-all-cold")
4646
// Move jump tables to a separate section
4747
.arg("-jump-tables=move")
48-
// Use GNU_STACK program header for new segment (workaround for issues with strip/objcopy)
49-
.arg("-use-gnu-stack")
5048
// Fold functions with identical code
5149
.arg("-icf=1")
5250
// Update DWARF debug info in the final binary

0 commit comments

Comments
 (0)