I have a assembly file and a c file compiled to .o files (start.o and main.o) and is trying to link them with ld. I'm using this command:
ld -T link.ld -o kernel.bin start.o main.o
where link.ld is a linker script, but when I run it, i get this error:
start.o:start.o:(.text+0x2d): undefined reference to `_main'
in the assembly file...
I've been looking at L.in.oleum and am intrigued by it's mix of higher-level constructs (loops, dynamic variables) with low-level assembler power (registers).
Are there other languages like Lino out there, which blend the speed of assembler with productivity enhancing features?
EDIT: I realized this kind of sounds like an ad. I'm ge...
As an assignment for a security class, I am trying to use __asm__("jmp 0xbffff994"); in my code, but when I disassemble things in gdb, the instruction is changed to jmp 0xc8047e2a.
Any idea why and how can I jump to a particular address?
...
I am just starting to lean MIPS assembly, and I am trying to write a simple while loop. It will be equivilent to the C code:
int A[5];
for(i=0;i<5;i++) A[i]=i;
So I know I can use beq to make a while loop, but I don't know how to increment the memory address each time to go to the next register. I think maybe the slt operand may be us...
I have a simple assembly function called from a c program and I have to use a instruction (FIDIV) that needs a memory operand.
Is it safe to move the value to [esp - 2] and use it in the next instruction or is it never safe to use the stack that way?
I know there are many workarounds, and I really don't need this anymore, so now it's j...
In a C# constructor, that ends up with a call to this(...), the actual call gets translated to this:
0000003d call dword ptr ds:[199B88E8h]
What is the DS register contents here? I know it's the data-segment, but is this call through a VMT-table or similar? I doubt it though, since this(...) wouldn't be a call to a virtual met...
The default assembly syntax file didn't works well,and after a searching on the web about gas assembly,found nothing about gas(AT&T syntax) syntax file for vim.. anyone found this??? I can't write my own syntax file..
ft=nasm
ft=asm(default)
ft=tasm
...
Lets assume I've allocated the address where my codecave is placed using VirtualAllocEx (it returns the address) and I write my code into that address using WriteProcessMemory().
Here's the question:
How do I write a jump to my codecave? I know that jumps start with "E9", but how do I convert the address returned by VirtualAllocEx into...
I encountered this word for the first time in the StackOverflow question "C# Theoretical: Write a JMP to a codecave in asm." I see that according to Wiktionary, a code cave is:
an unused block of memory that someone, typically a software cracker, can use to inject
custom programming code to modify the behavior of a program.
Did ...
suppose we use the addl
instruction to perform the equivalent
of the C expression "t=a+b",where
a,b,t are variables of type
int,then the conditional code will be set according to the following C
expression:
CF: (unsigned t) < (unsigned a) Unsigned Overflow
ZF: (t==0) Zero
SF: (t<0...
Hi
I have written a function nabs in assembly file math.nasm
as follows
%ifdef USE_x86_ASM
SECTION .text
cglobal nABS
;*------------------------*
;* int nABS(int a) *
;* return value in eax *
;*------------------------*
ALIGN 16
nABS:
push ebx
......
......
pop ebx
...
I'm working on a bare-bones system in which I need to determine sometime after boot how many cores and threads are enabled, so that I can send them SIPI events. I also want each thread to know which thread it is.
For instance, in a single-core configuration with HT enabled, we have (for instance, Intel Atom):
thread 0 --> core 0 threa...
Hi
Does iphone processor ARMV6 supports MMX instructions?
...
I have a question for all the hardcore low level hackers out there. I ran across this sentence in a blog. I don't really think the source matters (it's Haack if you really care) because it seems to be a common statement.
For example, many modern 3-D Games have their high performance core engine written in C++ and Assembly.
As far...
I read somewhere that effective addresses (as in the LEA instruction) in x86 instructions are calculated by the "EU." What is the EU? What is involved exactly in calculating an effective address?
I've only learned about the MC68k instruction set (UC Boulder teaches this first) and I can't find a good x86 webpage thru google =/ .
Thank...
CF: Carry Flag
ZF: Zero Flag
i'm current read a book on intel x86 assembly on linux platform using AT&T syntax,and the book said,the effect of setbe D is qeuivalent to:
D CF & ~ ZF
i understood that,but could it simply write as:
D CF|ZF
this only different from ~ZF&CF when CF/ZF is either 1/1,or 1/0.which one is more accurate?
...
It's known that CF indicates unsigned carry out and OF indicates signed overflow. So how does an assembly program differentiate between unsigned and signed data since it's only a sequence of bits? (Through additional memory storage for type information, or through positional information or else?) And could these two flags be used interch...
My client has an oracle data base and an object was persisted as a blob field via objOutStream.writeObject, the object now has a different serialVersionUID (even though the object has no change, maybe different jvm version) and when they try to de-serialize an exception is thrown:
java.io.InvalidClassException: CommissionResult; local c...
the following snippet is often used when said to be allocate storage for local variables
addl $8,%esp //allocate 8-byte storage
push %ebx //store some value onto the stack
why not simply push the value onto the stack,but rather allocated some space in advance?
...
I'm writing a MiPS program that will examine a list of 15 test scores. And it is going to input from the terminal. The passing criterion is the score of 50. The outputs to the terminal will include the scores in each category and the number of students passing and failing. I should use input prompts and output statement. Please I need so...