[all-commits] [llvm/llvm-project] 2f9238: [LLD][ELF][AArch64] Set _GLOBAL_OFFSET_TABLE_ at t...

Adhemerval Zanella via All-commits all-commits at lists.llvm.org
Mon Jan 18 09:51:50 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2f92386e721acd7badac06b67229537c4f0adfad
      https://github.com/llvm/llvm-project/commit/2f92386e721acd7badac06b67229537c4f0adfad
  Author: Adhemerval Zanella <adhemerval.zanella at linaro.org>
  Date:   2021-01-18 (Mon, 18 Jan 2021)

  Changed paths:
    M lld/ELF/Arch/AArch64.cpp
    M lld/test/ELF/global-offset-table-position-aarch64.s

  Log Message:
  -----------
  [LLD][ELF][AArch64] Set _GLOBAL_OFFSET_TABLE_ at the start of .got

The commit 18aa0be36ed9 changed the default GotBaseSymInGotPlt to true
for AArch64.  This is different than binutils, where
_GLOBAL_OFFSET_TABLE_ points at the start or .got.

It seems to not intefere with current relocations used by LLVM.  However
as indicated by PR#40357 [1] gcc generates R_AARCH64_LD64_GOTPAGE_LO15
for -pie (in fact it also generated the relocation for -fpic).

This change is requires to correctly handle R_AARCH64_LD64_GOTPAGE_LO15
by lld from objects generated by gcc.

[1] https://bugs.llvm.org/show_bug.cgi?id=40357




More information about the All-commits mailing list