mirror of
https://github.com/nganhkhoa/CTF-All-In-One.git
synced 2025-06-24 04:05:03 +07:00
update llvm
This commit is contained in:
BIN
src/Others/5.6_llvm/hello.bc
Normal file
BIN
src/Others/5.6_llvm/hello.bc
Normal file
Binary file not shown.
5
src/Others/5.6_llvm/hello.c
Normal file
5
src/Others/5.6_llvm/hello.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include <stdio.h>
|
||||
int main()
|
||||
{
|
||||
printf("hello, world\n");
|
||||
}
|
25
src/Others/5.6_llvm/hello.ll
Normal file
25
src/Others/5.6_llvm/hello.ll
Normal file
@ -0,0 +1,25 @@
|
||||
; ModuleID = 'hello.c'
|
||||
source_filename = "hello.c"
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
@.str = private unnamed_addr constant [14 x i8] c"hello, world\0A\00", align 1
|
||||
|
||||
; Function Attrs: noinline nounwind optnone sspstrong uwtable
|
||||
define i32 @main() #0 {
|
||||
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i32 0, i32 0))
|
||||
ret i32 0
|
||||
}
|
||||
|
||||
declare i32 @printf(i8*, ...) #1
|
||||
|
||||
attributes #0 = { noinline nounwind optnone sspstrong uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2}
|
||||
!llvm.ident = !{!3}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 4}
|
||||
!1 = !{i32 7, !"PIC Level", i32 2}
|
||||
!2 = !{i32 7, !"PIE Level", i32 2}
|
||||
!3 = !{!"clang version 5.0.1 (tags/RELEASE_501/final)"}
|
35
src/Others/5.6_llvm/hello.s
Normal file
35
src/Others/5.6_llvm/hello.s
Normal file
@ -0,0 +1,35 @@
|
||||
.text
|
||||
.file "hello.c"
|
||||
.globl main # -- Begin function main
|
||||
.p2align 4, 0x90
|
||||
.type main,@function
|
||||
main: # @main
|
||||
.cfi_startproc
|
||||
# BB#0:
|
||||
pushq %rbp
|
||||
.Lcfi0:
|
||||
.cfi_def_cfa_offset 16
|
||||
.Lcfi1:
|
||||
.cfi_offset %rbp, -16
|
||||
movq %rsp, %rbp
|
||||
.Lcfi2:
|
||||
.cfi_def_cfa_register %rbp
|
||||
movabsq $.L.str, %rdi
|
||||
movb $0, %al
|
||||
callq printf
|
||||
xorl %eax, %eax
|
||||
popq %rbp
|
||||
retq
|
||||
.Lfunc_end0:
|
||||
.size main, .Lfunc_end0-main
|
||||
.cfi_endproc
|
||||
# -- End function
|
||||
.type .L.str,@object # @.str
|
||||
.section .rodata.str1.1,"aMS",@progbits,1
|
||||
.L.str:
|
||||
.asciz "hello, world\n"
|
||||
.size .L.str, 14
|
||||
|
||||
|
||||
.ident "clang version 5.0.1 (tags/RELEASE_501/final)"
|
||||
.section ".note.GNU-stack","",@progbits
|
Reference in New Issue
Block a user