This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Grouping all string Literals in one pool in the binary image

Note: This was originally posted on 20th June 2013 at http://forums.arm.com

I am currently ramping up on ARM DS-5. I want to know if it is possible to ensure that all string literals and constants in the entire binary output image, can be grouped/pooled in one single contiguous location, so that I have a clear distinction between the location of Code and the location of String literals (and constants) in my binary image.


I have read about Literal pooling in ARM tools. But what I understood is that each section will have its own literal pool. And if a section is larger than 4KB, more Literal pools will be needed for the same section.
I want to know if it is possible to have only one literal pool for the entire binary image.
Alternatively, is it possible to group all literal pools together so that they are contiguous in memory?

Thanks.
Parents
  • Note: This was originally posted on 20th June 2013 at http://forums.arm.com

    Strictly speaking, the literal pool must be relatively close to the load/store instructions that use it. This is because the literal load/store use an offset applied to the PC to get the address of the literal value and the offset has a restricted range (plus or minus 4095 bytes for v7). However, the string literals and constants themselves do not need to be in the literal pool...only the 32-bit addresses of these items are required to be in the literal pool. So, you can place your strings and constants in a distinct memory space but still allow the literal pools to be located as needed. I don't know how to do this specifically for DS-5.
Reply
  • Note: This was originally posted on 20th June 2013 at http://forums.arm.com

    Strictly speaking, the literal pool must be relatively close to the load/store instructions that use it. This is because the literal load/store use an offset applied to the PC to get the address of the literal value and the offset has a restricted range (plus or minus 4095 bytes for v7). However, the string literals and constants themselves do not need to be in the literal pool...only the 32-bit addresses of these items are required to be in the literal pool. So, you can place your strings and constants in a distinct memory space but still allow the literal pools to be located as needed. I don't know how to do this specifically for DS-5.
Children
No data