[PATCH] D28552: [ELF] - Ignore R_386_NONE.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 06:31:06 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL291672: [ELF] - Ignore R_386_NONE. (authored by grimar).

Changed prior to commit:
  https://reviews.llvm.org/D28552?vs=83940&id=83969#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D28552

Files:
  lld/trunk/ELF/Target.cpp
  lld/trunk/test/ELF/relocation-none-i686.test


Index: lld/trunk/test/ELF/relocation-none-i686.test
===================================================================
--- lld/trunk/test/ELF/relocation-none-i686.test
+++ lld/trunk/test/ELF/relocation-none-i686.test
@@ -0,0 +1,23 @@
+# RUN: yaml2obj %s -o %t.o
+# RUN: ld.lld %t.o -o %t.out
+
+# Test that we can handle R_386_NONE.
+
+!ELF
+FileHeader:
+  Class:           ELFCLASS32
+  Data:            ELFDATA2LSB
+  Type:            ET_REL
+  Machine:         EM_386
+Sections:
+  - Name:            .text
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC ]
+  - Name:            .rel.text
+    Type:            SHT_RELA
+    Link:            .symtab
+    Info:            .text
+    Relocations:
+      - Offset:          0x0000000000000000
+        Symbol:          ''
+        Type:            R_386_NONE
Index: lld/trunk/ELF/Target.cpp
===================================================================
--- lld/trunk/ELF/Target.cpp
+++ lld/trunk/ELF/Target.cpp
@@ -383,6 +383,8 @@
     return R_TLS;
   case R_386_TLS_LE_32:
     return R_NEG_TLS;
+  case R_386_NONE:
+    return R_HINT;
   default:
     error("do not know how to handle relocation " + toString(Type) + " (" +
           Twine(Type) + ")");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28552.83969.patch
Type: text/x-patch
Size: 1237 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170111/ca67926d/attachment.bin>


More information about the llvm-commits mailing list