[PATCH] D87381: [LLD][PowerPC][test] Update thunk range error report for PPC64PCRelLongBranchThunk
Sean Fertile via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 10:30:17 PDT 2020
sfertile added inline comments.
================
Comment at: lld/test/ELF/ppc64-pcrel-call-to-toc-error.s:1
+# REQUIRES: ppc, system-linux
+# RUN: echo 'SECTIONS { \
----------------
MaskRay wrote:
> 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.
This is outside my wheelhouse, so I have to ask for clarification: The test can use PHDRS command to create multiple small load segments, then in the SECTIONS command we would have 2 lines like:
``` .output_section_name { input_sections_to_match } : load_segment_name```
The first to match callers section, then increase the address sufficiently far away and have a second similar line for the callees section?
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