Add an OperatingSystem plugin to support goroutines

The Go runtime schedules user level threads (goroutines) across real threads.
This adds an OS plugin to create memory threads for goroutines.
It supports the 1.4 and 1.5 go runtime.

Differential Revision: http://reviews.llvm.org/D5871

llvm-svn: 247852
This commit is contained in:
Ryan Brown
2015-09-16 21:20:44 +00:00
parent 8be1847b09
commit 65d4d5c3c6
25 changed files with 949 additions and 16 deletions

View File

@@ -693,6 +693,7 @@ ObjectFilePECOFF::CreateSections (SectionList &unified_section_list)
static ConstString g_sect_name_dwarf_debug_ranges (".debug_ranges");
static ConstString g_sect_name_dwarf_debug_str (".debug_str");
static ConstString g_sect_name_eh_frame (".eh_frame");
static ConstString g_sect_name_go_symtab (".gosymtab");
SectionType section_type = eSectionTypeOther;
if (m_sect_headers[idx].flags & llvm::COFF::IMAGE_SCN_CNT_CODE &&
((const_sect_name == g_code_sect_name) || (const_sect_name == g_CODE_sect_name)))
@@ -736,6 +737,7 @@ ObjectFilePECOFF::CreateSections (SectionList &unified_section_list)
else if (const_sect_name == g_sect_name_dwarf_debug_ranges) section_type = eSectionTypeDWARFDebugRanges;
else if (const_sect_name == g_sect_name_dwarf_debug_str) section_type = eSectionTypeDWARFDebugStr;
else if (const_sect_name == g_sect_name_eh_frame) section_type = eSectionTypeEHFrame;
else if (const_sect_name == g_sect_name_go_symtab) section_type = eSectionTypeGoSymtab;
else if (m_sect_headers[idx].flags & llvm::COFF::IMAGE_SCN_CNT_CODE)
{
section_type = eSectionTypeCode;