[LLVMdev] Implementing the ldr pseudo instruction in ARM integrated assembler

Jim Grosbach
Fri, 01 Nov 2013 19:06:56 -0000

On Nov 1, 2013, at 12:06 PM, David Peixotto <dpeixott at codeaurora.org>
wrote:

>>> I was thinking that without the .ltorg directive the constant pool
>>> would go at the end of the section.
>>>
>> So where does the assembler place the constant pool(s) if that
directive
>> isn't present? I was under the impression it was always required.
>
> From my understanding it is not required. I see that GCC will place it at
> the end of the section. I don't know if it will ever place it anywhere
> besides the end of the section when there is no .ltorg directive.
>
> Here is the relevant section from the gcc docs
> (https://sourceware.org/binutils/docs/as/ARM-Directives.html):
>
> """
> .ltorg
> This directive causes the current contents of the literal pool to be dumped
> into the current section (which is assumed to be the .text section) at the
> current location (aligned to a word boundary). GAS maintains a separate
> literal pool for each section and each sub-section. The .ltorg directive
> will only affect the literal pool of the current section and sub-section.
At
> the end of assembly all remaining, un-empty literal pools will
automatically
> be dumped.
> """
>

What does ARM’s documentation say?