forked from open-obfuscator/o-mvll
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support global string initializer as part of constant expressions
When encoding strings with `StringEncOptGlobal` option, take into account those appearing as part of global initializers of constant expressions, used by global variables.
- Loading branch information
1 parent
4a2b42e
commit daf92b1
Showing
3 changed files
with
52 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
; REQUIRES: aarch64-registered-target | ||
|
||
; RUN: env OMVLL_CONFIG=%S/config_replace.py clang++ -fpass-plugin=%libOMVLL \ | ||
; RUN: -target arm64-apple-ios -fno-legacy-pass-manager -O1 -c %s -o - | strings | FileCheck %s | ||
; | ||
; RUN: env OMVLL_CONFIG=%S/config_replace.py clang++ -fpass-plugin=%libOMVLL \ | ||
; RUN: -target aarch64-linux-android -fno-legacy-pass-manager -O1 -c %s -o - | strings | FileCheck %s | ||
; | ||
; CHECK-NOT: {{.*Hello.*}} | ||
|
||
@.hello = private constant [6 x i8] c"Hello\00" | ||
@str = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.hello, i32 0, i32 0) | ||
|
||
define i32 @main() #0 { | ||
%load = load i8*, i8** @str, align 8 | ||
%call = call i32 @puts(i8* %load) | ||
ret i32 0 | ||
} | ||
|
||
declare i32 @puts(i8*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters