How is the number of images $ Ro $ limit in ads calculated?

Source: Internet
Author: User

I recently looked at the bootloader -- boot270 of youlong 270. This bootloader can only be used for both boot wince and boot Linux. It was written by Intel and modified by youlong.

In boot270, the memory also needs to be moved like uboot. During the migration, data such as image $ Ro $ limit needs to be used.

The variable with $ is the reserved variable of ads. It can be seen in the ADS link guide that there is no variable in the source file, as if it was generated during link.
I read the article about how to calculate image $ Ro $ limit on the Internet:

Http://z86k.blog.163.com/blog/static/90796156201002511040829/

This version is mostly used on the Internet.

 

Yes:

| Image $ Ro $ base | = image entry point = 0x0c100000; indicates the starting address for storing program code | image $ Ro $ limit | = starting address of program code + code length + 1 = 0x0c100000 + tatal Ro size + 1

 

My image entry point = 0xa000 0000

 

Code compilation:

Code Ro data RW data Zi data debug

57960 155433 4722 9699 grand totals

========================================================== ====================

Total Ro size (code + RO data) 213393 (208.39kb)
Total RW size (RW data + Zi data) 14421 (14.08kb)
Total Rom size (code + RO Data + RW data) 218115 (213.00kb)

========================================================== ====================

 

Calculated as follows (218115d = 0x35403 ):

0xa000 0000 + 0x3 5403 + 1 =0x0xa003 5404

 

However, I can see in the output image symbol table of the project:

Global symbols

Symbol name value ov type size object (Section)

Image $ Ro $ limit 0xa00341b4 number 0 anon $ obj. O absolute
Image $ RW $ base 0xa2000000 number 0 anon $ obj. O absolute

 

Description Image $ Ro $ Limit =0xa00341b4This is not consistent with the calculation result above. I don't know which one is correct?

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.