first ,sorry for the confusing expression conveyed here.
thanks.
As I was still confused on what you are talking about, I jumped back to your first post. I think I figured out some of the misunderstandings here:
- "when will the eip be 0x c0 10 00 00" - You are confused about the .text section starting at 0xc0100000 instead of 0xc0000000, right? (I am wondering about this, too.)
no, I think where I would set breakpoint 0xC0000000 or 0x00100000?
or if I set the two breakpoint in bochs at the same time, on which one would it first break?
[*] "may i subsititute..." - I have no idea where you got the "AT(0x10 00 00)" from. You don't have to substitute that with ".text : AT(ADDR(.text) - 0xC0000000)" because the latter is already what is in the original code.
sorry for the wrong usage ,I used,of the word 'substitute',
maybe I want to say, may I substitute AT(ADDR(.text) - 0XC0000000) with AT(0x0010 0000),
I think the .text is loaded at 0x0010 0000 in physical memory.
the logical address 0xC000 0000 after page translate is the same thing as 0x0010 0000.
[*] "what's usage of .text here?" - are you asking about how to use .text (a question that doesn't make sense to me), or are you asking why .text is used that way (no idea myself, perhaps any of the linker script gurus knowing this)?
because in the script, there are one address 0x0010 0000 and the other one 0xc000 0000,
what I understand in your previous post, is the first 0x10 0000 is address of .setup section,
the address of 0xC000 0000 is referenced by other sections.
I think indeed, there are two form address can be used to reference the symbol in the other sections.
1,the logical address started from 0xC000 0000,which would be used when page enabled.
2.the physical address started from 0x0010 0000,since the other sections have to be loaded 0x0010 0000 in fact.
[*] "when CS:(E)IP adds the base address in the selector and the eip(offset)? when CS:(E)IP generate the logical address as
CS<< 4 + (E)IP?" - Google for the DOS edition of "The Art of Assembly", which explains this rather nicely. In short, when the CPU starts (at boot) it is in 16bit "Real Mode", which uses CS<<4 + IP. When you switch to 32bit "Protected Mode", this becomes (selector base) + EIP.
i like the in short the sentence.
[/list]
I hope this does nail it down a bit.