1c93fc11fSTom Stellard //===-- AMDGPUHSATargetObjectFile.cpp - AMDGPU Object Files ---------------===//
2c93fc11fSTom Stellard //
3c93fc11fSTom Stellard //                     The LLVM Compiler Infrastructure
4c93fc11fSTom Stellard //
5c93fc11fSTom Stellard // This file is distributed under the University of Illinois Open Source
6c93fc11fSTom Stellard // License. See LICENSE.TXT for details.
7c93fc11fSTom Stellard //
8c93fc11fSTom Stellard //===----------------------------------------------------------------------===//
9c93fc11fSTom Stellard 
10c93fc11fSTom Stellard #include "AMDGPUTargetObjectFile.h"
11c93fc11fSTom Stellard #include "AMDGPU.h"
12c93fc11fSTom Stellard #include "Utils/AMDGPUBaseInfo.h"
13c93fc11fSTom Stellard #include "llvm/MC/MCContext.h"
14c93fc11fSTom Stellard #include "llvm/MC/MCSectionELF.h"
15c93fc11fSTom Stellard #include "llvm/Support/ELF.h"
16c93fc11fSTom Stellard 
17c93fc11fSTom Stellard using namespace llvm;
18c93fc11fSTom Stellard 
19c93fc11fSTom Stellard //===----------------------------------------------------------------------===//
20c93fc11fSTom Stellard // Generic Object File
21c93fc11fSTom Stellard //===----------------------------------------------------------------------===//
22c93fc11fSTom Stellard 
23*4367c7fbSEric Christopher MCSection *AMDGPUTargetObjectFile::SelectSectionForGlobal(
24*4367c7fbSEric Christopher     const GlobalValue *GV, SectionKind Kind, const TargetMachine &TM) const {
25b8253c88STom Stellard   if (Kind.isReadOnly() && AMDGPU::isReadOnlySegment(GV))
26c93fc11fSTom Stellard     return TextSection;
27c93fc11fSTom Stellard 
28*4367c7fbSEric Christopher   return TargetLoweringObjectFileELF::SelectSectionForGlobal(GV, Kind, TM);
29c93fc11fSTom Stellard }
30