[PATCH] D87381: [LLD][PowerPC][test] Update thunk range error report for PPC64PCRelLongBranchThunk
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 08:34:46 PDT 2020
MaskRay added inline comments.
================
Comment at: lld/test/ELF/ppc64-pcrel-call-to-toc-error.s:1
+# REQUIRES: ppc, system-linux
+# RUN: echo 'SECTIONS { \
----------------
sfertile wrote:
> nemanjai wrote:
> > MaskRay wrote:
> > > Delete system-linux
> > >
> > > I think this test is portable and runs on other systems.
> > It appears that the file systems on FreeBSD and Linux behave differently. On Linux, writing the large file (8GB in this case) happens in a fraction of a second which suggests that it is not actually writing the bytes to storage. However, on FreeBSD this takes a significant amount of time - perhaps it is actually writing the bytes to storage. So we limit these test cases that produce large files to Linux to avoid this problem.
> >
> > The issue can be avoided on FreeBSD by writing out to `/dev/null` or some other special file because that won't `mmap` - it creates a memory buffer. However, that causes a different problem on systems that limit virtual memory - the OS won't allow the process to allocate a memory buffer that size.
> >
> > So the easiest solution we found was to write to a real file and limit this to Linux.
> Thanks for the thorough explanation.
> Really minor nit: can we have the comment that explains this right after the requires directive instead of after the linker script?
In this case, PHDRS and `:segment` should be specified to assign sections to different text segments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87381/new/
https://reviews.llvm.org/D87381
More information about the llvm-commits
mailing list