[PATCH] D27532: Remove a special handling of AMDGPU entry points.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 8 09:43:26 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL289077: Remove a special handling of AMDGPU entry points. (authored by ruiu).

Changed prior to commit:
  https://reviews.llvm.org/D27532?vs=80632&id=80778#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D27532

Files:
  lld/trunk/ELF/Driver.cpp
  lld/trunk/test/ELF/amdgpu-entry.s


Index: lld/trunk/test/ELF/amdgpu-entry.s
===================================================================
--- lld/trunk/test/ELF/amdgpu-entry.s
+++ lld/trunk/test/ELF/amdgpu-entry.s
@@ -1,16 +0,0 @@
-# RUN: llvm-mc -filetype=obj -triple amdgcn--amdhsa -mcpu=kaveri %s -o %t.o
-# RUN: not ld.lld -e kernel0 %t.o -o %t
-
-# REQUIRES: amdgpu
-
-.hsa_code_object_version 1,0
-.hsa_code_object_isa 7,0,0,"AMD","AMDGPU"
-
-.hsatext
-.globl kernel0
-.align 256
-.amdgpu_hsa_kernel kernel0
-kernel0:
-  s_endpgm
-.Lfunc_end0:
-  .size kernel0, .Lfunc_end0-kernel0
Index: lld/trunk/ELF/Driver.cpp
===================================================================
--- lld/trunk/ELF/Driver.cpp
+++ lld/trunk/ELF/Driver.cpp
@@ -222,9 +222,6 @@
   if (Config->EMachine == EM_MIPS && Config->GnuHash)
     error("the .gnu.hash section is not compatible with the MIPS target.");
 
-  if (Config->EMachine == EM_AMDGPU && !Config->Entry.empty())
-    error("-e option is not valid for AMDGPU.");
-
   if (Config->Pie && Config->Shared)
     error("-shared and -pie may not be used together");
 
@@ -772,11 +769,10 @@
   if (Config->OutputFile.empty())
     Config->OutputFile = "a.out";
 
-  // Use default entry point name if -e was missing. AMDGPU binaries
-  // have no entries. For some reason, MIPS' entry point name is
+  // Use default entry point name if no name was given via the command
+  // line nor linker scripts. For some reason, MIPS entry point name is
   // different from others.
-  if (Config->Entry.empty() && !Config->Relocatable &&
-      Config->EMachine != EM_AMDGPU)
+  if (Config->Entry.empty() && !Config->Relocatable)
     Config->Entry = (Config->EMachine == EM_MIPS) ? "__start" : "_start";
 
   // Handle --trace-symbol.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27532.80778.patch
Type: text/x-patch
Size: 1742 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161208/c8fba01f/attachment.bin>


More information about the llvm-commits mailing list