Skip to content

Instantly share code, notes, and snippets.

@int3

int3/test.ll Secret

Created March 11, 2022 00:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save int3/d25a9cb7e1a12084fe1348ed8bee146f to your computer and use it in GitHub Desktop.
Save int3/d25a9cb7e1a12084fe1348ed8bee146f to your computer and use it in GitHub Desktop.
; REQUIRES: x86
; RUN: rm -rf %t; split-file %s %t
; RUN: llvm-as %t/main.ll -o %t/main.o
; RUN: llvm-mc -triple=x86_64-apple-darwin %t/absolute.s -o %t/2.o -filetype=obj
; RUN: %lld %t.o %t/2.o -o %t/3.out
;--- main.ll
target triple = "x86_64-apple-macosx10.15.0"
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
@blah = external global i8, align 1
define i8* @main() {
ret i8* @blah
}
;--- absolute.s
.globl _blah
_blah = 0xdeadbeef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment