Created
January 27, 2016 20:52
-
-
Save jlk/533bc83691887f298a5c to your computer and use it in GitHub Desktop.
variable expansion
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
glibc has the following line: | |
#define SYS_ify(syscall_name) __NR_##syscall_name | |
So I'm trying to do a similar expansion with "name" below: | |
# undef PSEUDO | |
# define PSEUDO(name, syscall_name, args) \ | |
.data; \ | |
##name_jtarget_name: .string "test"; \ | |
.text; \ | |
ENTRY (name) \ | |
movl $##name_jtarget_name, %esi; \ | |
DO_CALL (syscall_name, args); \ | |
cmpq $-4095, %rax; \ | |
jae SYSCALL_ERROR_LABEL | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment