[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: Detect address materialization and arithmetics (PR #132540)

Kristof Beyls via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Mar 31 06:28:49 PDT 2025


================
@@ -1,7 +1,8 @@
 if "AArch64" not in config.root.targets:
     config.unsupported = True
 
-flags = "--target=aarch64-linux-gnu -nostartfiles -nostdlib -ffreestanding"
+# -Wl,--no-relax prevents converting ADRP+ADD pairs into NOP+ADR.
+flags = "--target=aarch64-linux-gnu -nostartfiles -nostdlib -ffreestanding -Wl,--no-relax"
----------------
kbeyls wrote:

I'm not entirely sure, but maybe we should only add `-Wl,--no-relax` to test case gs-pauth-address-materialization.s (and other test cases that require it in the future)?
If we add too many special flags to the default flags for all the binary analysis test cases, we might end up running all test cases accidentally under some flags that are too far removed from the typical flags used to build production software?

https://github.com/llvm/llvm-project/pull/132540


More information about the llvm-branch-commits mailing list