x86-64

How to build netty-transport-native-epoll-4.0.32.Final-linux-x86_64.jar?

依然范特西╮ 提交于 2020-01-02 08:21:49
问题 I am using native epoll transport in netty and was able to download netty-transport-native-epoll-4.0.32.jar from the repository. However I also need netty-transport-native-epoll-4.0.32.Final-linux-x86_64.jar but not unable to find it anywhere. Please let me know where to download this jar, or how to build it. 回答1: The file can be found here : http://repo.scub-foundation.org/artifactory/libs-release/io/netty/netty-transport-native-epoll/4.0.32.Final/ The content doesn't seem to be different

How do I ask the assembler to “give me a full size register”?

筅森魡賤 提交于 2020-01-02 07:55:11
问题 I'm trying to allow the assembler to give me a register it chooses, and then use that register with inline assembly. I'm working with the program below, and its seg faulting. The program was compiled with g++ -O1 -g2 -m64 wipe.cpp -o wipe.exe . When I look at the crash under lldb, I believe I'm getting a 32-bit register rather than a 64-bit register. I'm trying to compute an address (base + offset) using lea , and store the result in a register the assembler chooses: "lea (%0, %1), %2\n"

C/C++ returning struct by value under the hood

落花浮王杯 提交于 2020-01-02 07:04:41
问题 (This question is specific to my machine's architecture and calling conventions, Windows x86_64) I don't exactly remember where I had read this, or if I had recalled it correctly, but I had heard that, when a function should return some struct or object by value, it will either stuff it in rax (if the object can fit in the register width of 64 bits) or be passed a pointer to where the resulting object would be (I'm guessing allocated in the calling function's stack frame) in rcx , where it

Using RIP-relative addressing in OSX x64 assembly

南楼画角 提交于 2020-01-02 05:18:10
问题 I was trying to make a basic printf example in x86-64 assembly code for OSX, here's my first version: section .data msg db 'hello', 0Ah section .text extern _printf global _main _main: sub rsp, 8 mov rdi, msg mov rax, 0 call _printf add rsp, 8 ret So this code is moving the absolute address of msg into rdi for the first argument to _printf , and gcc then complains about the lack of position-independent code. The binary still works though: → nasm -f macho64 new.asm && gcc -m64 -o new new.o &&

Address Space Layout Randomization( ALSR ) and mmap

社会主义新天地 提交于 2020-01-02 04:10:10
问题 I expect that due to Address Space Layout Randomization (ALSR) a process forked from another process will have different addresses returned when calling mmap . But as I found out, that was not the case. I made the following test program for that purpose. All the addresses returned by malloc are exactly the same for the parent and the child. Note that the malloc for cl1 , cl2 , pl1 , pl2 internally uses mmap because they are large blocks. So, my question is, why mmap is not returning different

Fast fibers/coroutines under x64 Windows

人走茶凉 提交于 2020-01-01 18:17:33
问题 So I have this coroutine API, extended by me, based on code I found here: https://the8bitpimp.wordpress.com/2014/10/21/coroutines-x64-and-visual-studio/ struct mcontext { U64 regs[8]; U64 stack_pointer; U64 return_address; U64 coroutine_return_address; }; struct costate { struct mcontext callee; struct mcontext caller; U32 state; }; void coprepare(struct costate **token, void *stack, U64 stack_size, cofunc_t func); /* C code */ void coenter(struct costate *token, void *arg); /* ASM code */

linux assembly: how to call syscall?

我怕爱的太早我们不能终老 提交于 2020-01-01 14:37:45
问题 I want to call a syscall in assembly. The problem is I can't mov ecx,rsp . rsp is 64-bit register, ecx is a 32-bit register. I want to pass the buffer addr as a parameter of this syscall. What can I do? Thanks. section .data s0: db "Largest basic function number supported:%s\n",0 s0len: equ $-s0 section .text global main extern write main: sub rsp, 16 xor eax, eax cpuid mov [rsp], ebx mov [rsp+4], edx mov [rsp+8], ecx mov [rsp+12], word 0x0 mov eax, 4 mov ebx, 1 mov ecx, rsp mov edx, 4 int

Is mmap deterministic if ASLR is disabled?

▼魔方 西西 提交于 2020-01-01 09:32:33
问题 If Address Space Layout Randomization (ASLR) is disabled, would we have a deterministic mmap ? By deterministic, I mean that If I run the same application again and again with the same inputs, will I get the same addresses returned by mmap ? I am mostly interested in anonymous mmaps. 回答1: If Address Space Layout Randomization (ASLR) is disabled, would we have a deterministic mmap? If your application has exactly the same memory layout at moment of i-th mmap (in terms of which pages of virtual

GCC从头到尾自制编译脚本

喜夏-厌秋 提交于 2020-01-01 00:50:04
目录 简介 预处理 编译 汇编 链接 分析链接过程 头文件路径 动态库路径 使用到的标准目标文件 使用到的动态库 获得gcc默认的链接脚本 MakeFile 参考资料 简介 本文的目的是深入理解gcc编译的过程,以及从编译到链接,做一个自己定制化的编译脚本。常用的 预处理 编译 汇编 链接 源文件只有一个 test.c 预处理 生成 test.i 文件 root@zhou 22:01:40 ~/r/p/Chapter1 # gcc -v -E test.c -o test.i Using built-in specs. COLLECT_GCC = gcc OFFLOAD_TARGET_NAMES = nvptx-none OFFLOAD_TARGET_DEFAULT = 1 Target: x86_64-linux-gnu Configured with: .. /src/configure -v --with-pkgversion = 'Ubuntu 7.5.0-3ubuntu1~18.04' --with-bugurl = file:///usr/share/doc/gcc-7/README.Bugs --enable-languages = c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix = /usr --with-gcc

linux6 x86-64 RPM包安装mysql5.7.20

北战南征 提交于 2020-01-01 00:35:34
注意版本和此次更新时间 2017-12-03 版本:mysql-5.7.20-1.el6.x86_64 环境:linux6.x ​官方下载地址: wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.20-1.el6.x86_64.rpm-bundle.tar 解压: tar -xvf mysql-5.7.20-1.el6.x86_64.rpm-bundle.tar 卸载之前的版本 rpm -qa | grep -i mysql rpm -e xxxxx [之前安装的版本] --nodeps 要卸载的mysql版本 按照步骤来安装就好 1.rpm -ivh mysql-community-libs-5.7.20-1.el6.x86_64.rpm --nodeps --force 2.rpm -ivh mysql-community-devel-5.7.20-1.el6.x86_64.rpm --nodeps --force 3.rpm -ivh mysql-community-client-5.7.20-1.el6.x86_64.rpm --nodeps --force 4.rpm -ivh mysql-community-server-5.7.20-1.el6.x86_64.rpm --nodeps -