Grandpa code generator-generator in LCC
Monday, May 2, 2011
Linker Scripts VMA vs LMA
VMA is virtual memory address while LMA is load memory address. If both are not equal, which one of the addresses does linker consider while resolving symbols' addresses?
Let us consider a simple program test.c:
int i=10;
int main() {
return i++;
}
After compiling it to ELF-executable, dump the output sections. (I am compiling for AVR target using avr-gcc)
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000040 00000000 00000000 00000074 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000002 00800060 00000040 000000b4 2**0
CONTENTS, ALLOC, LOAD, DATA
Notice the values in bold. VMA and LMA of .data section differ? Since 'i' is the only variable, what address will 'i' have? VMA or LMA ? When the text section is disassembled, what will be the address of memory accessed by instructions to read and write the value of variable 'i'?
Reference for linker script file: Linker Script Documentation
Friday, March 25, 2011
Relocations - I
Link-Time/Load-Time/Run-Time Relocations vs Software and Hardware Relocations vs Linkers and Loaders.
I am in a zombie state.
I am in a zombie state.
Thursday, March 10, 2011
The case for Reduced Instruction Set Computer
This wonderful newsletter in SIGARCH(1980) by Patterson et.al explains the origins of RISC architectures in much simpler terms.
Wednesday, March 9, 2011
Thursday, March 3, 2011
Kleene-Rosser Paradox
I wish I can understand what exactly is paradoxical in this...
What if a function negates itself? However much I try I am simply unable to do away with my C-language perspective.
Time to realize that functional languages very much exist.
What if a function negates itself? However much I try I am simply unable to do away with my C-language perspective.
An alternate solution is to re-interpret lambda calculus not as a theory of logical assertions, but rather as a means of expressing computation. In this way, the paradox can be "solved" by reinterpreting it as a recursive statement, that is, the infinite recursion implying
Time to realize that functional languages very much exist.
Wednesday, March 2, 2011
Subscribe to:
Posts (Atom)