summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-12-08 17:32:58 +0000
committerRui Ueyama <ruiu@google.com>2016-12-08 17:32:58 +0000
commit34bf8677a4d4a6ffe8930673b909660ebd179532 (patch)
tree105aabfad934346ca55f29a3a4c8d56719c4a626
parent18009560c59deceb2be577e0182f7016d6ee1121 (diff)
downloadbcm5719-llvm-34bf8677a4d4a6ffe8930673b909660ebd179532.tar.gz
bcm5719-llvm-34bf8677a4d4a6ffe8930673b909660ebd179532.zip
Remove a special handling of AMDGPU entry points.
This is the last peculiar semantics left in the linker. If you want to always set an entry point to 0, you can pass `-e 0` to the linker. Differential Revision: https://reviews.llvm.org/D27532 llvm-svn: 289077
-rw-r--r--lld/ELF/Driver.cpp10
-rw-r--r--lld/test/ELF/amdgpu-entry.s16
2 files changed, 3 insertions, 23 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 6afaf77ceb8..394023cfc50 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -222,9 +222,6 @@ static void checkOptions(opt::InputArgList &Args) {
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 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &Args) {
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.
diff --git a/lld/test/ELF/amdgpu-entry.s b/lld/test/ELF/amdgpu-entry.s
deleted file mode 100644
index 2a47b1778de..00000000000
--- a/lld/test/ELF/amdgpu-entry.s
+++ /dev/null
@@ -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
OpenPOWER on IntegriCloud