att

What is the “.s” suffix in x86 instructions?

巧了我就是萌 提交于 2019-11-28 00:52:17
When I disassemble the .text sections of some binaries using objdump (with both AT&T and Intel syntaxes), I sometimes see instructions with a .s suffix, for example: cmpb.s %bh,%ch , sbbl.s %edi,%edi , or adcb.s %bl,%dh . Does the .s suffix have a valid/useful meaning (perhaps not even as a suffix), or is this an artefact of disassembling some data / padding as if it was a sequence of instructions? Thank you. To understand what the .s suffix means, you need to understand how x86 instructions are encoded. If we take adc as an example, there are four main forms that the operands can take: The

lea assembly instruction

断了今生、忘了曾经 提交于 2019-11-28 00:34:10
问题 I Just want to make sure I am reading this right: movl 12(%ebp), %edx leal (%edx, %edx, 4), %eax I read the first line as: edx = [epb + 12] , and the second line as: eax = edx + edx*4 Can anybody clarify? Also, what if I had the following two lines: leal (%edx, %edx, 4), %eax leal (%edx, %edx, 2), %eax Once the second line is executed, would the eax register be overwritten? And the eax = edx + edx*4 is multiplying the address by 4? Or the contents of the address by 4? 回答1: You're right. The

Questions about AT&T x86 Syntax design

a 夏天 提交于 2019-11-27 20:09:43
Can anyone explain to me why every constant in AT&T syntax has a '$' in front of it? Why do all registers have a '%'? Is this just another attempt to get me to do a lot of lame typing? Also, am I the only one that finds: 16(%esp) really counterintuitive compared to [esp+16] ? I know it compiles to the same thing but why would anyone want to type a lot of '$' and '%'s without a need to? - Why did GNU choose this syntax as the default? Another thing, why is every instruction in at&t syntax preceded by an: l? - I do know its for the operand sizes, however why not just let the assembler figure

Set adb vendor keys

只谈情不闲聊 提交于 2019-11-27 20:00:54
EDIT: I figured out the problem, i think. ADB found out I wasn't on the latest updates (at&t released a stagefright udpate and i didnt know) so ADB didn't let me debug. Everything is fine now. I have been debugging my app on an AT&T HTC One M8 for about a month. Suddenly today when I plugged in my phone, I didn't get the authorization popup. After an hour of troubleshooting, I found the problem, but not a solution. This is the error i get in Android Studio 1.3.1: device unauthorized. This adbd's $ADB_VENDOR_KEYS is not set; try 'adb kill-server' if that seems wrong. Otherwise check for a

AttributeError: module 'cv2' has no attribute 'SIFT'

*爱你&永不变心* 提交于 2019-11-27 12:43:58
原因:opencv将SIFT等算法整合到xfeatures2d集合里面了。 将siftDetector=cv2.SIFT() 变更后为 siftDetector= cv2.xfeatures2d.SIFT_create() 即可正常使用SIFT算法。 import cv2 import numpy as np img = cv2 . imread ( 'C:/Users/www12/Desktop/Photo/test_1.jpg' ) gray = cv2 . cvtColor ( img , cv2 . COLOR_BGR2GRAY ) sift = cv2 . xfeatures2d . SIFT_create ( ) kp = sift . detect ( gray , None ) img = cv2 . drawKeypoints ( gray , kp , img ) cv2 . imshow ( 'img' , cv2 . resize ( img , ( 800 , 600 ) ) ) cv2 . waitKey ( 0 ) cv2 . destroyAllWindows ( ) 来源: CSDN 作者: HUN ysy 链接: https://blog.csdn.net/weixin_43772533/article/details/103242930

CSS的选择器

徘徊边缘 提交于 2019-11-27 12:02:10
1.基础的选择器 选择器 含义 示例 * 通用元素选择器,匹配任何元素 * { margin:0; padding:0; } E 标签选择器,匹配所有使用E标签的元素 p { font-size:2em; } .info和E.info class选择器,匹配所有class属性中包含info的元素 .info { background:#ff0; } p.info { background:#ff0; } #info和E#info id选择器,匹配所有id属性等于footer的元素 #info { background:#ff0; } p#info { background:#ff0; } 2.组合选择器 选择器 含义 示例 E,F 多元素选择器,同时匹配所有E元素或F元素,E和F之间用逗号分隔 Div,p { color:#f00; } E F 后代元素选择器,匹配所有属于E元素后代的F元素,E和F之间用空格分隔 #nav li { display:inline; } li a { font-weight:bold; } E > F 子元素选择器,匹配所有E元素的子元素F div > strong { color:#f00; } E + F 毗邻元素选择器,匹配所有紧随E元素之后的同级元素F p + p { color:#f00; } 3.CSS 2.1 属性选择器 选择器 含义

gas: too many memory reference

空扰寡人 提交于 2019-11-27 09:45:20
When compiling the following instruction: movl 4(%ebp), 8(%ebp) I got: too many memory reference . What's wrong with it? The number before the parenthesis is a byte offset (which causes a memory reference to occur), and you cannot have two of them with movl . You need to move the value temporarily to a register first. movl 4(%ebp), %ecx movl %ecx, 8(%ebp) It is not a legal instruction. For most instructions that reference memory you must move it to/from a register. movl doesn't to memory-memory moves, you have to go by way of a register (thus with two movl instructions). 来源: https:/

What was the original reason for the design of AT&T assembly syntax? [closed]

时间秒杀一切 提交于 2019-11-27 09:18:44
When using assembly instructions on x86 or amd64, programmer can use "Intel" (i.e. nasm compiler) or "AT&T" (i.e. gas compiler) assembly syntax. "Intel" syntax is more popular on Windows, but "AT&T" is more popular on UNIX(-like) systems. But both Intel and AMD manuals, so manuals created by the creators of the chip, are both using the "Intel" syntax. I'm wondering, what was the original idea behind the design of the "AT&T" syntax? What was the benefit for floating away from notation used by the creators of the processor? UNIX was for a long time developed on the PDP-11, a 16 bit computer from

What does the bracket in `movl (%eax), %eax` mean?

有些话、适合烂在心里 提交于 2019-11-27 08:57:30
I have googled enough but could not figure out what the bracket () means. Also, I see some syntax as movl 8(%ebp), %eax Could some someone suggest me some good reference? I have not been able to find any in the top 20 results from Google. LaC %eax is register EAX; (%eax) is the memory location whose address is contained in the register EAX; 8(%eax) is the memory location whose address is the value of EAX plus 8. osgx http://web.archive.org/web/20080215230650/http://sig9.com/articles/att-syntax is quick introduction into Unix (AT&T) asm syntax. Googled by at&t asm syntax . The post is "AT&T

How does the jmp instruction work in att assembly in this instance

安稳与你 提交于 2019-11-27 06:31:37
问题 I am stepping through a function in AT&T assembly right now and can't figure out how this specific jmp command works. jmp *0x804a140(,%eax,4) How exactly is it using the %eax register and 4 with the jump instruction? I have never seen jmp used this way before. 回答1: If you are confused by at&t syntax, switch your tool to intel mode. The effective address you see is not specific to jumps, you could have encountered it with any instruction that takes a memory operand. In intel syntax this would