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

David Peixotto dpeixott at codeaurora.org
Fri Nov 1 12:06:00 PDT 2013


> > 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.
"""




More information about the llvm-dev mailing list