-
-
Save int3/d25a9cb7e1a12084fe1348ed8bee146f to your computer and use it in GitHub Desktop.
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
; 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