Skip to content

Instantly share code, notes, and snippets.

@int3

int3/test.ll Secret

Created September 28, 2022 19:01
Show Gist options
  • Save int3/e9581f9fd48fe8e69c9a5c29e0cc8f9a to your computer and use it in GitHub Desktop.
Save int3/e9581f9fd48fe8e69c9a5c29e0cc8f9a to your computer and use it in GitHub Desktop.
; REQUIRES: x86
; RUN: rm -rf %t; split-file %s %t
; RUN: opt -module-summary %t/hide-me.ll -o %t/hide-me.o
; RUN: opt -module-summary %t/ref.ll -o %t/ref.o
; RUN: %lld -lSystem %t/hide-me.o %t/ref.o -o %t/out
;--- hide-me.ll
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.7.0"
@hide_me = hidden local_unnamed_addr global i8 0, align 1
;--- ref.ll
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.7.0"
@"\01_hide_me" = external local_unnamed_addr global i8
define i8 @main() {
%1 = load i8, ptr @"\01_hide_me", align 1
ret i8 %1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment