| OLD | NEW |
| 1 //===- subzero/src/IceELFSection.cpp - Representation of ELF sections -----===// | 1 //===- subzero/src/IceELFSection.cpp - Representation of ELF sections -----===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // This file defines how ELF sections are represented. | 10 // This file defines how ELF sections are represented. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 NewSymbol.Sym.st_value = Offset; | 48 NewSymbol.Sym.st_value = Offset; |
| 49 NewSymbol.Sym.st_size = Size; | 49 NewSymbol.Sym.st_size = Size; |
| 50 NewSymbol.Number = ELFSym::UnknownNumber; | 50 NewSymbol.Number = ELFSym::UnknownNumber; |
| 51 SymtabKey Key = {Name, Section}; | 51 SymtabKey Key = {Name, Section}; |
| 52 bool Unique; | 52 bool Unique; |
| 53 if (Type == STB_LOCAL) | 53 if (Type == STB_LOCAL) |
| 54 Unique = LocalSymbols.insert(std::make_pair(Key, NewSymbol)).second; | 54 Unique = LocalSymbols.insert(std::make_pair(Key, NewSymbol)).second; |
| 55 else | 55 else |
| 56 Unique = GlobalSymbols.insert(std::make_pair(Key, NewSymbol)).second; | 56 Unique = GlobalSymbols.insert(std::make_pair(Key, NewSymbol)).second; |
| 57 assert(Unique); | 57 assert(Unique); |
| 58 (void)Unique; |
| 58 } | 59 } |
| 59 | 60 |
| 60 void ELFSymbolTableSection::noteUndefinedSym(const IceString &Name, | 61 void ELFSymbolTableSection::noteUndefinedSym(const IceString &Name, |
| 61 ELFSection *NullSection) { | 62 ELFSection *NullSection) { |
| 62 ELFSym NewSymbol = ELFSym(); | 63 ELFSym NewSymbol = ELFSym(); |
| 63 NewSymbol.Sym.setBindingAndType(STB_GLOBAL, STT_NOTYPE); | 64 NewSymbol.Sym.setBindingAndType(STB_GLOBAL, STT_NOTYPE); |
| 64 NewSymbol.Number = ELFSym::UnknownNumber; | 65 NewSymbol.Number = ELFSym::UnknownNumber; |
| 65 SymtabKey Key = {Name, NullSection}; | 66 SymtabKey Key = {Name, NullSection}; |
| 66 GlobalSymbols.insert(std::make_pair(Key, NewSymbol)); | 67 GlobalSymbols.insert(std::make_pair(Key, NewSymbol)); |
| 67 } | 68 } |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 continue; | 151 continue; |
| 151 } | 152 } |
| 152 StringIndex.second = StringData.size(); | 153 StringIndex.second = StringData.size(); |
| 153 std::copy(Cur.begin(), Cur.end(), back_inserter(StringData)); | 154 std::copy(Cur.begin(), Cur.end(), back_inserter(StringData)); |
| 154 StringData.push_back(0); | 155 StringData.push_back(0); |
| 155 Prev = Cur; | 156 Prev = Cur; |
| 156 } | 157 } |
| 157 } | 158 } |
| 158 | 159 |
| 159 } // end of namespace Ice | 160 } // end of namespace Ice |
| OLD | NEW |