[PATCH] D34459: [ELF] Better handling of _GLOBAL_OFFSET_TABLE_

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 21 09:17:04 PDT 2017


evgeny777 created this revision.
evgeny777 added a project: lld.
Herald added subscribers: javed.absar, emaste.

We have several pieces of assembly code which have something like following

  .Lablel:
      _GLOBAL_OFFSET_TABLE_ - .Label

it works fine with ld/gold, but fails to link with lld (relocation cannot refer to absolute symbol)

Also this patch sets correct value for _GLOBAL_OFFSET_TABLE_, this is why one of existing test changed.


Repository:
  rL LLVM

https://reviews.llvm.org/D34459

Files:
  ELF/Relocations.cpp
  ELF/Symbols.cpp
  ELF/Symbols.h
  ELF/Writer.cpp
  test/ELF/arm-got-relative.s
  test/ELF/arm-got-relative2.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34459.103401.patch
Type: text/x-patch
Size: 4340 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170621/f9b5ff66/attachment.bin>


More information about the llvm-commits mailing list