[PATCH] D15383: [ELF] - R_386_GOTOFF relocation implemented.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 09:43:57 PST 2015


grimar created this revision.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar.

R_386_GOTOFF is calculated as S + A - GOT, where:
S - Represents the value of the symbol whose index resides in the relocation entry.
A - Represents the addend used to compute the value of the relocatable field.
GOT - Represents the address of the global offset table.

This relocation needs got address.
Problem here was that got table was not created if had no entries. Had to change how GOT gets to the output, test covers that case.

http://reviews.llvm.org/D15383

Files:
  ELF/OutputSections.h
  ELF/Target.cpp
  ELF/Writer.cpp
  test/ELF/got-i386.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15383.42311.patch
Type: text/x-patch
Size: 4077 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151209/3e58ea7c/attachment.bin>


More information about the llvm-commits mailing list