[llvm] r212864 - [RuntimeDyld] Fix stub size and offset for AArch64 in RuntimeDyldMachO.h.
David Blaikie
dblaikie at gmail.com
Mon Jul 14 10:43:35 PDT 2014
On Fri, Jul 11, 2014 at 5:16 PM, Lang Hames <lhames at gmail.com> wrote:
> Author: lhames
> Date: Fri Jul 11 19:16:47 2014
> New Revision: 212864
>
> URL: http://llvm.org/viewvc/llvm-project?rev=212864&view=rev
> Log:
> [RuntimeDyld] Fix stub size and offset for AArch64 in RuntimeDyldMachO.h.
>
> <rdar://problem/17648000>
>
>
> Modified:
> llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
>
> Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h?rev=212864&r1=212863&r2=212864&view=diff
> ==============================================================================
> --- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h (original)
> +++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h Fri Jul 11 19:16:47 2014
> @@ -16,7 +16,6 @@
>
> #include "ObjectImageCommon.h"
> #include "RuntimeDyldImpl.h"
> -#include "llvm/ADT/IndexedMap.h"
> #include "llvm/Object/MachO.h"
> #include "llvm/Support/Format.h"
>
> @@ -56,11 +55,20 @@ private:
> return 8; // 32-bit instruction and 32-bit address
> else if (Arch == Triple::x86_64)
> return 8; // GOT entry
> + else if (Arch == Triple::arm64)
> + return 8; // GOT entry
> else
> return 0;
> }
>
> - unsigned getStubAlignment() override { return 1; }
> + unsigned getStubAlignment() override {
> + if (Arch == Triple::arm || Arch == Triple::thumb)
> + return 4;
> + else if (Arch == Triple::arm64)
You can drop the 'else' here /\
> + return 8;
> + else
and here /\
( http://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return )
Oh, and in the previous function too.
> + return 1;
> + }
>
> relocation_iterator processSECTDIFFRelocation(
> unsigned SectionID,
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list