[llvm-dev] [LLD] Linker Relaxation
Bruce Hoult via llvm-dev
llvm-dev at lists.llvm.org
Thu Jul 13 05:25:01 PDT 2017
On Thu, Jul 13, 2017 at 5:57 AM, PkmX via llvm-dev <llvm-dev at lists.llvm.org>
> On Thu, Jul 13, 2017 at 6:07 AM, Bruce Hoult <bruce at hoult.org> wrote:
> > As a concrete suggestion, here is code for deciding how many bytes of
> > padding to emit.
> > For the case of .align 2 (4 byte alignment), it will emit a minimum of 3
> > a maximum of 6 bytes of padding. For .align 4 it emit a minimum of 15
> and a
> > maximum of 30 bytes of padding.
> Why does .align 2 need 3 to 6 bytes of padding though? I think for
> `.p2align n` only 2^n - 2 (or 2^n - 4 without RVC) padding bytes would be
Because the PC can be left at an odd address by a .ascii or .byte
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev