this is a piece of code in C that calls ASM directly:
http://blog.rchapman.org/post.
this is a piece of code in C that calls ASM directly:
http://blog.rchapman.org/post.
problem solved. The problem is that my failure to declare rax
in the fourth domain of asm ()
causes changed, to cause 0
to be stored directly in rax
.
the correct code is as follows:
void _start() {
int ret = 2;
asm(
"mov $60, %%rax;" // __NR_exit
"mov %0, %%edi;" // param 1
"syscall"
:
: "r"(ret)
: "rax", "rdi"
);
}
Previous: The webview page style of step-by-step higher learning machine S2webapp is out of order.
Next: How to force svn to overwrite the main branch? the main branch is not needed.
two servers in the same Ali cloud environment A: [root@AY140220152843902sdg46ZsG ~]-sharp openssl version -a OpenSSL 1.0.1e-fips 11 Feb 2013 built on: Wed Mar 22 21:43:28 UTC 2017 although the version is very long, according to built on, there is an ...
in practice, we encountered the use of vector < string > as a local variable to temporarily store a large number of string, and found that a large amount of memory was not released after running. After taking a look at the related problems, it is general...
linux script command. The shell script itself has log output, but there is no log in the cron expression. What is the reason and how to solve it? shell script command: nohup tcps modules hadoop hadoop-2.6.2 bin hadoop jar tcps modules hadoop jar ca...
two questions, when logging in, typing mysql-u root-p correctly jumps to the password line, but you can t type the password on the keyboard. You can t log in with a password, but you can log in directly by typing mysql. Is this the wrong place? I have...
the description is not clear. Please look at the code and the result directly. Thank you. void * product (void * arg) { int rear = 0 ; while(1) { rear = (rear + 1)%5; printf("p:%d n",rear); Sleep(500); } } int main (void...
how can I change the speed of the mouse? [root@localhost ~]-sharp xinput list Virtual core pointer id=2 [master pointer (3)] Virtual core XTEST pointer id=4 [slave pointer (2)] Logitech USB Keyb...
now the company uniformly uses wireless Internet access (a wireless network card is plugged into the desktop), but there is a cabin where there is no wireless signal. I have a wireless router (tp-link) on hand. Because of the problem of sharing the prin...
in fact, there is nothing wrong with my installation, the only problem is that it is different from the example given in the official documents, which makes me think I am wrong. trying to go down is not a big problem. excuse me. the server is the Al...
crontab runs every 3 hours 3 sh home test.sh in this case, I saved it at 8 o clock, so will it run at 9 o clock? what time is it every 3 hours? ...
When are DMA and interrupts in RT,IO mode used respectively? ...
after running the autogen.sh script, the error log is as follows: libtoolize: copying file `m4 ltversion.m4 libtoolize: copying file `m4 lt~obsolete.m4 configure.ac:96: error: possibly undefined macro: AC_DEFINE If this token and others are ...
is it because the operation is wrong, or is it because Google stops supporting 32-bit chrome? my actions: download 32-bit deb file address: https: google-chrome.en.upto. sudo dpkg-I deb filename sudo apt-get install-f Open chrome afte...
recently I tried to move the finished website (thinkph5 framework) to a remote server, but found that VPS s PDO was not installed: PHP5.65.3: ...
every time composer up appears this and updates it for a long time No problem if you update locally, update will appear on top of the linux service composer has also been updated and has not been resolved ...
the code is as follows: < H1 > include "apue.h " < H1 > static void sig_int (int); int main (void) { sigset_t newmask, oldmask; pr_mask("program start: "); if (signal(SIGINT, sig_int) == SIG_ERR) err_sys("signal(SIGINT) ...
< H1 > current solution < H1 > server bool is_server_disconnected(int client_socket) { set_flag(client_socket, O_NONBLOCK); char buffer[10]; int length = recv(client_socket, buffer, 10, 0); clr_flag(client_socket, O_NONBLOCK)...
the execution process is as follows git clone https: github.com jquery jqu.Cloning into jquery . fatal: unable to access https: github.com jquery jqu. : Peer reports incompatible or unsupported protocol version. I don t know what went ...
yesterday crontab was configured to close the samba service regularly, but the service was not turned on in the morning and there was no log, so I would like to know what the problem is: root@VM-0-9-ubuntu: var log-sharp crontab -l * 1 * * * * usr...
I recently upgraded gdb from 7.12 to 8: 00, and debug found that when I display a string, the content displayed is very complicated! For example, startSym= "A "; such a simple string, disp startSym appears as follows: >>> disp startSym $2 = {...
1. Use ring buffers to exchange data, threadWrite-> buf-> threadRead threadWrite { memcpy(buf[pushCount & mask], value, size); pushCountPP; ... } threadRead { ... } if mask = = 2, pushCount accumulates from 0 when pushCount = 0 pushCount & ma...