[PATCH] D108986: [JITLink] Add initial Aarch64 support
Stefan Gränitz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 3 01:51:47 PDT 2021
sgraenitz added inline comments.
================
Comment at: llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp:88-98
+ Error addRelocations() override {
+ using Base = ELFLinkGraphBuilder<ELFT>;
+ LLVM_DEBUG(dbgs() << "Adding relocations\n");
+
+ // Iterate sections and only process the interesting ones.
+ for (auto &SecRef : Base::Sections) {
+ if (SecRef.sh_type != ELF::SHT_RELA && SecRef.sh_type != ELF::SHT_REL)
----------------
lhames wrote:
> There is a lot of redundancy in these `addRelocations` functions. Do you think we could add a generic function (or functions) to the ELFLinkGraphBuilder so that clients can just write:
>
> ```
> for_all_relas([](const Rela &R) {
> // Handle rela
> });
> ```
>
> ?
>
> I don't think this is something that we should do for this review, but it should be done either before or after it lands so that future backends don't keep copying this code.
Yes, I agree. Shouldn't be too much effort. I will post something soon.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108986/new/
https://reviews.llvm.org/D108986
More information about the llvm-commits
mailing list