Created
July 7, 2017 01:40
-
-
Save orivej/8379fbd550022e966f77d1516e31702a 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
.global bar_version | |
.symver bar_version, bar@@VERSION | |
nop | |
bar_version: | |
jmp bar_version |
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
.global _start | |
nop | |
_start: | |
mov bar, %rax | |
testq %rax, %rax | |
jnz _start |
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
default: main | |
main: main.o bar.a | |
ld.lld -o $@ $^ | |
.o.a: | |
ar r $@ $^ | |
.s.o: | |
llvm-mc -filetype=obj -triple=x86_64-unknown-linux -o $@ $< |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment