[lld] [ELF] Align the end of PT_GNU_RELRO associated PT_LOAD to a common-page-size boundary (PR #66042)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 15 10:24:16 PDT 2023
MaskRay wrote:
> We started seeing a test failure:
>
> ```
> FAIL: lld :: ELF/linkerscript/data-segment-relro-ppc64.test (1203 of 2824)
> ******************** TEST 'lld :: ELF/linkerscript/data-segment-relro-ppc64.test' FAILED ********************
> Script:
> --
> : 'RUN: at line 2'; rm -rf /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp && split-file /b/s/w/ir/x/w/llvm-llvm-project/lld/test/ELF/linkerscript/data-segment-relro-ppc64.test /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp
> : 'RUN: at line 3'; /b/s/w/ir/x/w/llvm_build/bin/llvm-mc -filetype=obj -triple=powerpc64le /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/a.s -o /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/a.o
> : 'RUN: at line 4'; /b/s/w/ir/x/w/llvm_build/bin/llvm-mc -filetype=obj -triple=powerpc64le /b/s/w/ir/x/w/llvm-llvm-project/lld/test/ELF/linkerscript/Inputs/shared.s -o /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/b.o
> : 'RUN: at line 5'; /b/s/w/ir/x/w/llvm_build/bin/ld.lld -shared -soname=b /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/b.o -o /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/b.so
> : 'RUN: at line 7'; /b/s/w/ir/x/w/llvm_build/bin/ld.lld -z max-page-size=65536 -z norelro /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/a.o /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/b.so -T /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/1.t -o /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/a1
> : 'RUN: at line 10'; /b/s/w/ir/x/w/llvm_build/bin/ld.lld -z max-page-size=65536 -z relro /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/a.o /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/b.so -T /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/1.t -o /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/a2
> : 'RUN: at line 11'; /b/s/w/ir/x/w/llvm_build/bin/llvm-readelf -S -l /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/a2 | /b/s/w/ir/x/w/llvm_build/bin/FileCheck /b/s/w/ir/x/w/llvm-llvm-project/lld/test/ELF/linkerscript/data-segment-relro-ppc64.test --check-prefixes=CHECK2
> --
> Exit Code: 1
>
> Command Output (stderr):
> --
> ```
>
> https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8769957246457079665/overview
We started seeing a test failure:
```
FAIL: lld :: ELF/linkerscript/data-segment-relro-ppc64.test (1203 of 2824)
******************** TEST 'lld :: ELF/linkerscript/data-segment-relro-ppc64.test' FAILED ********************
Script:
--
: 'RUN: at line 2'; rm -rf /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp && split-file /b/s/w/ir/x/w/llvm-llvm-project/lld/test/ELF/linkerscript/data-segment-relro-ppc64.test /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp
: 'RUN: at line 3'; /b/s/w/ir/x/w/llvm_build/bin/llvm-mc -filetype=obj -triple=powerpc64le /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/a.s -o /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/a.o
: 'RUN: at line 4'; /b/s/w/ir/x/w/llvm_build/bin/llvm-mc -filetype=obj -triple=powerpc64le /b/s/w/ir/x/w/llvm-llvm-project/lld/test/ELF/linkerscript/Inputs/shared.s -o /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/b.o
: 'RUN: at line 5'; /b/s/w/ir/x/w/llvm_build/bin/ld.lld -shared -soname=b /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/b.o -o /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/b.so
: 'RUN: at line 7'; /b/s/w/ir/x/w/llvm_build/bin/ld.lld -z max-page-size=65536 -z norelro /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/a.o /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/b.so -T /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/1.t -o /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/a1
: 'RUN: at line 10'; /b/s/w/ir/x/w/llvm_build/bin/ld.lld -z max-page-size=65536 -z relro /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/a.o /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/b.so -T /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/1.t -o /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/a2
: 'RUN: at line 11'; /b/s/w/ir/x/w/llvm_build/bin/llvm-readelf -S -l /b/s/w/ir/x/w/llvm_build/tools/lld/test/ELF/linkerscript/Output/data-segment-relro-ppc64.test.tmp/a2 | /b/s/w/ir/x/w/llvm_build/bin/FileCheck /b/s/w/ir/x/w/llvm-llvm-project/lld/test/ELF/linkerscript/data-segment-relro-ppc64.test --check-prefixes=CHECK2
--
Exit Code: 1
Command Output (stderr):
--
```
Fixed by 72bbac47389918502f95423eaeb90733a6b8bb89
```
--- a/lld/test/ELF/linkerscript/data-segment-relro-ppc64.test
+++ b/lld/test/ELF/linkerscript/data-segment-relro-ppc64.test
@@ -1,4 +1,4 @@
-# REQUIRES: x86
+# REQUIRES: ppc
```
https://github.com/llvm/llvm-project/pull/66042
More information about the llvm-commits
mailing list