[PATCH] D94612: [LLD][ELF][AArch64] Add support for R_AARCH64_LD64_GOTPAGE_LO15 relocation

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 11:19:50 PST 2021


MaskRay added inline comments.


================
Comment at: lld/test/ELF/aarch64-gotpage.s:5
+# RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-linux %t/test.s -o %t.o
+# RUN: ld.lld -pie --script %t/script %t.o -o %t.exe
+# RUN: llvm-readobj -r %t.exe | FileCheck --check-prefix=RELOCS %s
----------------
psmith wrote:
> Will be worth adding a test case with pie or shared to make sure the relocation is allowed in those cases.
Please see `aarch64-fpic-got.s`. The idea is that we want to exercise the `isStaticLinkTimeConstant` path, i.e.

if `global` is defined in a shared object, this can still be linked in `-shared` mode.

Personally I don't think having another test making `global` defined in the executable is necessary.

You can change common symbols to regular data symbols since we've already have sufficient common tests and this test does not need to tie to common.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94612/new/

https://reviews.llvm.org/D94612



More information about the llvm-commits mailing list