Dale Martin via llvm-dev
2020-Oct-06 20:05 UTC
[llvm-dev] A proposed patch for llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h
Here's a 2 line patch I would like to propose: 1. Fix a typo s/anordered/an ordered/g 2. Instead of just printing to llvm::errs, report a fatal error and stop. If there is a better list to discuss this on, please let me know. Thanks, Dale diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h index aee5f6dc374..f34c93e8007 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h @@ -114,8 +114,7 @@ public: // memory layout to be: CodeSection < ReadOnlySection < ReadWriteSection. const uint64_t ImageBase = getImageBase(); if (Value < ImageBase || ((Value - ImageBase) > UINT32_MAX)) { - llvm::errs() << "IMAGE_REL_AMD64_ADDR32NB relocation requires an" - << "ordered section layout.\n"; + report_fatal_error("IMAGE_REL_AMD64_ADDR32NB relocation requires an ordered section layout"); write32BitOffset(Target, 0, 0); } else { write32BitOffset(Target, RE.Addend, Value - ImageBase); -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201006/a1bb6182/attachment.html>
Lang Hames via llvm-dev
2020-Oct-06 22:18 UTC
[llvm-dev] A proposed patch for llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h
Hi Dale, Future patches are best sent to llvm-commits, or posted on Phabricator ( https://llvm.org/docs/Phabricator.html). This is a good fix though -- I've committed it in b45b5166f8f. Thanks for the contribution! Regards, Lang. On Tue, Oct 6, 2020 at 1:06 PM Dale Martin via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Here’s a 2 line patch I would like to propose: > > 1. Fix a typo s/anordered/an ordered/g > 2. Instead of just printing to llvm::errs, report a fatal error and > stop. > > > > If there is a better list to discuss this on, please let me know. > > > > Thanks, > > Dale > > > > diff --git > a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h > b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h > > index aee5f6dc374..f34c93e8007 100644 > > --- a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h > > +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h > > @@ -114,8 +114,7 @@ public: > > // memory layout to be: CodeSection < ReadOnlySection < > ReadWriteSection. > > const uint64_t ImageBase = getImageBase(); > > if (Value < ImageBase || ((Value - ImageBase) > UINT32_MAX)) { > > - llvm::errs() << "IMAGE_REL_AMD64_ADDR32NB relocation requires an" > > - << "ordered section layout.\n"; > > + report_fatal_error("IMAGE_REL_AMD64_ADDR32NB relocation requires > an ordered section layout"); > > write32BitOffset(Target, 0, 0); > > } else { > > write32BitOffset(Target, RE.Addend, Value - ImageBase); > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201006/378a8e05/attachment.html>