[PATCH] generate .init_array instead of .ctors sections for AArch64 ELF targets
Rafael EspĂndola
rafael.espindola at gmail.com
Thu Jan 9 08:21:16 PST 2014
On 9 January 2014 10:28, Kristof Beyls <kristof.beyls at arm.com> wrote:
> Hi,
>
>
>
> The AArch64 C++ ABI states that .init_array sections should be used for
> static constructors.
>
> The attached patches (one for clang, one for LLVM), make sure that these
> sections get
> produced in an ABI-compliant way, not just for linux platforms, but for all
> ELF-based
> platforms. Could I get a review on these patches?
>
+ if (Subtarget->isTargetELF()) {
+ return new AArch64ElfTargetObjectFile();
+ }
llvm_unreachable("unknown subtarget type");
This could now be just
assert(Subtarget->isTargetELF());
llvm_unreachable("unknown subtarget type");
llvm patch LGTM with that.
Cheers,
Rafael
More information about the llvm-commits
mailing list