Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 1 | //===- Target.cpp ---------------------------------------------------------===// |
| 2 | // |
| 3 | // The LLVM Linker |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
Rui Ueyama | 34f2924 | 2015-10-13 19:51:57 +0000 | [diff] [blame] | 9 | // |
| 10 | // Machine-specific stuff, such as applying relocations, creation of |
| 11 | // GOT or PLT entries, etc., are is handled in this file. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 14 | |
| 15 | #include "Target.h" |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 16 | #include "Error.h" |
Rui Ueyama | af21d92 | 2015-10-08 20:06:07 +0000 | [diff] [blame] | 17 | #include "OutputSections.h" |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 18 | #include "Symbols.h" |
Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 19 | |
| 20 | #include "llvm/ADT/ArrayRef.h" |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 21 | #include "llvm/Object/ELF.h" |
Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 22 | #include "llvm/Support/Endian.h" |
| 23 | #include "llvm/Support/ELF.h" |
| 24 | |
| 25 | using namespace llvm; |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 26 | using namespace llvm::object; |
Rafael Espindola | 0872ea3 | 2015-09-24 14:16:02 +0000 | [diff] [blame] | 27 | using namespace llvm::support::endian; |
Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 28 | using namespace llvm::ELF; |
| 29 | |
| 30 | namespace lld { |
| 31 | namespace elf2 { |
| 32 | |
| 33 | std::unique_ptr<TargetInfo> Target; |
| 34 | |
Rui Ueyama | 9100439 | 2015-10-13 16:08:15 +0000 | [diff] [blame] | 35 | TargetInfo *createTarget() { |
| 36 | switch (Config->EMachine) { |
| 37 | case EM_386: |
| 38 | return new X86TargetInfo(); |
| 39 | case EM_AARCH64: |
| 40 | return new AArch64TargetInfo(); |
| 41 | case EM_MIPS: |
| 42 | return new MipsTargetInfo(); |
| 43 | case EM_PPC: |
| 44 | return new PPCTargetInfo(); |
| 45 | case EM_PPC64: |
| 46 | return new PPC64TargetInfo(); |
| 47 | case EM_X86_64: |
| 48 | return new X86_64TargetInfo(); |
| 49 | } |
| 50 | error("Unknown target machine"); |
| 51 | } |
| 52 | |
Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 53 | TargetInfo::~TargetInfo() {} |
| 54 | |
Rafael Espindola | 6d7fcdb | 2015-09-29 13:36:32 +0000 | [diff] [blame] | 55 | bool TargetInfo::relocPointsToGot(uint32_t Type) const { return false; } |
| 56 | |
Rafael Espindola | ae24400 | 2015-10-05 19:30:12 +0000 | [diff] [blame] | 57 | bool TargetInfo::isRelRelative(uint32_t Type) const { return true; } |
| 58 | |
Rafael Espindola | 7f07442 | 2015-09-22 21:35:51 +0000 | [diff] [blame] | 59 | X86TargetInfo::X86TargetInfo() { |
| 60 | PCRelReloc = R_386_PC32; |
| 61 | GotReloc = R_386_GLOB_DAT; |
Rafael Espindola | 8acb95c | 2015-09-29 14:42:37 +0000 | [diff] [blame] | 62 | GotRefReloc = R_386_GOT32; |
Rafael Espindola | 7f07442 | 2015-09-22 21:35:51 +0000 | [diff] [blame] | 63 | } |
Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 64 | |
| 65 | void X86TargetInfo::writePltEntry(uint8_t *Buf, uint64_t GotEntryAddr, |
Rui Ueyama | c58656c | 2015-10-13 16:59:30 +0000 | [diff] [blame] | 66 | uint64_t PltEntryAddr) const { |
| 67 | // jmpl *val; nop; nop |
| 68 | const uint8_t Inst[] = {0xff, 0x25, 0, 0, 0, 0, 0x90, 0x90}; |
Rui Ueyama | 1500a90 | 2015-09-29 23:00:47 +0000 | [diff] [blame] | 69 | memcpy(Buf, Inst, sizeof(Inst)); |
Rui Ueyama | c58656c | 2015-10-13 16:59:30 +0000 | [diff] [blame] | 70 | assert(isUInt<32>(GotEntryAddr)); |
| 71 | write32le(Buf + 2, GotEntryAddr); |
Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 72 | } |
| 73 | |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 74 | bool X86TargetInfo::relocNeedsGot(uint32_t Type, const SymbolBody &S) const { |
Rui Ueyama | 5ba3ac4 | 2015-09-30 01:40:08 +0000 | [diff] [blame] | 75 | return Type == R_386_GOT32 || relocNeedsPlt(Type, S); |
Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 76 | } |
| 77 | |
Rafael Espindola | 6d7fcdb | 2015-09-29 13:36:32 +0000 | [diff] [blame] | 78 | bool X86TargetInfo::relocPointsToGot(uint32_t Type) const { |
| 79 | return Type == R_386_GOTPC; |
| 80 | } |
| 81 | |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 82 | bool X86TargetInfo::relocNeedsPlt(uint32_t Type, const SymbolBody &S) const { |
George Rimar | 730c278 | 2015-10-07 18:46:13 +0000 | [diff] [blame] | 83 | return Type == R_386_PLT32 || (Type == R_386_PC32 && S.isShared()); |
Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 84 | } |
| 85 | |
Rui Ueyama | 87bc41b | 2015-10-06 18:54:43 +0000 | [diff] [blame] | 86 | static void add32le(uint8_t *L, int32_t V) { write32le(L, read32le(L) + V); } |
Rui Ueyama | 87bc41b | 2015-10-06 18:54:43 +0000 | [diff] [blame] | 87 | static void or32le(uint8_t *L, int32_t V) { write32le(L, read32le(L) | V); } |
Rafael Espindola | 0872ea3 | 2015-09-24 14:16:02 +0000 | [diff] [blame] | 88 | |
Hal Finkel | 87bbd5f | 2015-10-12 21:19:18 +0000 | [diff] [blame] | 89 | void X86TargetInfo::relocateOne(uint8_t *Buf, uint8_t *BufEnd, const void *RelP, |
| 90 | uint32_t Type, uint64_t BaseAddr, |
| 91 | uint64_t SymVA) const { |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 92 | typedef ELFFile<ELF32LE>::Elf_Rel Elf_Rel; |
| 93 | auto &Rel = *reinterpret_cast<const Elf_Rel *>(RelP); |
| 94 | |
| 95 | uint32_t Offset = Rel.r_offset; |
Rui Ueyama | 87bc41b | 2015-10-06 18:54:43 +0000 | [diff] [blame] | 96 | uint8_t *Loc = Buf + Offset; |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 97 | switch (Type) { |
Rafael Espindola | 8acb95c | 2015-09-29 14:42:37 +0000 | [diff] [blame] | 98 | case R_386_GOT32: |
Rui Ueyama | af21d92 | 2015-10-08 20:06:07 +0000 | [diff] [blame] | 99 | add32le(Loc, SymVA - Out<ELF32LE>::Got->getVA()); |
Rafael Espindola | 8acb95c | 2015-09-29 14:42:37 +0000 | [diff] [blame] | 100 | break; |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 101 | case R_386_PC32: |
Rui Ueyama | 87bc41b | 2015-10-06 18:54:43 +0000 | [diff] [blame] | 102 | add32le(Loc, SymVA - (BaseAddr + Offset)); |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 103 | break; |
| 104 | case R_386_32: |
Rui Ueyama | 87bc41b | 2015-10-06 18:54:43 +0000 | [diff] [blame] | 105 | add32le(Loc, SymVA); |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 106 | break; |
| 107 | default: |
Rui Ueyama | 1c42afc | 2015-10-12 15:49:06 +0000 | [diff] [blame] | 108 | error("unrecognized reloc " + Twine(Type)); |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 109 | } |
| 110 | } |
| 111 | |
Rafael Espindola | 7f07442 | 2015-09-22 21:35:51 +0000 | [diff] [blame] | 112 | X86_64TargetInfo::X86_64TargetInfo() { |
| 113 | PCRelReloc = R_X86_64_PC32; |
| 114 | GotReloc = R_X86_64_GLOB_DAT; |
Rafael Espindola | 8acb95c | 2015-09-29 14:42:37 +0000 | [diff] [blame] | 115 | GotRefReloc = R_X86_64_PC32; |
Rafael Espindola | ae24400 | 2015-10-05 19:30:12 +0000 | [diff] [blame] | 116 | RelativeReloc = R_X86_64_RELATIVE; |
Rafael Espindola | 7f07442 | 2015-09-22 21:35:51 +0000 | [diff] [blame] | 117 | } |
Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 118 | |
| 119 | void X86_64TargetInfo::writePltEntry(uint8_t *Buf, uint64_t GotEntryAddr, |
Rui Ueyama | c58656c | 2015-10-13 16:59:30 +0000 | [diff] [blame] | 120 | uint64_t PltEntryAddr) const { |
| 121 | // jmpq *val(%rip); nop; nop |
| 122 | const uint8_t Inst[] = {0xff, 0x25, 0, 0, 0, 0, 0x90, 0x90}; |
Rui Ueyama | 1500a90 | 2015-09-29 23:00:47 +0000 | [diff] [blame] | 123 | memcpy(Buf, Inst, sizeof(Inst)); |
Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 124 | |
Rui Ueyama | c58656c | 2015-10-13 16:59:30 +0000 | [diff] [blame] | 125 | uint64_t NextPC = PltEntryAddr + 6; |
| 126 | int64_t Delta = GotEntryAddr - NextPC; |
| 127 | assert(isInt<32>(Delta)); |
| 128 | write32le(Buf + 2, Delta); |
Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 129 | } |
| 130 | |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 131 | bool X86_64TargetInfo::relocNeedsGot(uint32_t Type, const SymbolBody &S) const { |
Rui Ueyama | 5ba3ac4 | 2015-09-30 01:40:08 +0000 | [diff] [blame] | 132 | return Type == R_X86_64_GOTPCREL || relocNeedsPlt(Type, S); |
Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 133 | } |
| 134 | |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 135 | bool X86_64TargetInfo::relocNeedsPlt(uint32_t Type, const SymbolBody &S) const { |
Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 136 | switch (Type) { |
| 137 | default: |
| 138 | return false; |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 139 | case R_X86_64_PC32: |
| 140 | // This relocation is defined to have a value of (S + A - P). |
Rafael Espindola | 3c412e1 | 2015-09-30 12:30:58 +0000 | [diff] [blame] | 141 | // The problems start when a non PIC program calls a function in a shared |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 142 | // library. |
Rafael Espindola | 9a0db7c | 2015-09-29 23:23:53 +0000 | [diff] [blame] | 143 | // In an ideal world, we could just report an error saying the relocation |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 144 | // can overflow at runtime. |
Rafael Espindola | 3c412e1 | 2015-09-30 12:30:58 +0000 | [diff] [blame] | 145 | // In the real world with glibc, crt1.o has a R_X86_64_PC32 pointing to |
| 146 | // libc.so. |
| 147 | // |
| 148 | // The general idea on how to handle such cases is to create a PLT entry |
| 149 | // and use that as the function value. |
| 150 | // |
| 151 | // For the static linking part, we just return true and everything else |
| 152 | // will use the the PLT entry as the address. |
| 153 | // |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 154 | // The remaining (unimplemented) problem is making sure pointer equality |
Rafael Espindola | 3c412e1 | 2015-09-30 12:30:58 +0000 | [diff] [blame] | 155 | // still works. We need the help of the dynamic linker for that. We |
| 156 | // let it know that we have a direct reference to a so symbol by creating |
| 157 | // an undefined symbol with a non zero st_value. Seeing that, the |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 158 | // dynamic linker resolves the symbol to the value of the symbol we created. |
| 159 | // This is true even for got entries, so pointer equality is maintained. |
| 160 | // To avoid an infinite loop, the only entry that points to the |
Rafael Espindola | 3c412e1 | 2015-09-30 12:30:58 +0000 | [diff] [blame] | 161 | // real function is a dedicated got entry used by the plt. That is |
| 162 | // identified by special relocation types (R_X86_64_JUMP_SLOT, |
| 163 | // R_386_JMP_SLOT, etc). |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 164 | return S.isShared(); |
Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 165 | case R_X86_64_PLT32: |
| 166 | return true; |
| 167 | } |
| 168 | } |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 169 | |
Rafael Espindola | ae24400 | 2015-10-05 19:30:12 +0000 | [diff] [blame] | 170 | bool X86_64TargetInfo::isRelRelative(uint32_t Type) const { |
| 171 | switch (Type) { |
| 172 | default: |
| 173 | return false; |
| 174 | case R_X86_64_PC64: |
| 175 | case R_X86_64_PC32: |
| 176 | case R_X86_64_PC16: |
| 177 | case R_X86_64_PC8: |
| 178 | return true; |
| 179 | } |
| 180 | } |
| 181 | |
Hal Finkel | 87bbd5f | 2015-10-12 21:19:18 +0000 | [diff] [blame] | 182 | void X86_64TargetInfo::relocateOne(uint8_t *Buf, uint8_t *BufEnd, |
| 183 | const void *RelP, uint32_t Type, |
| 184 | uint64_t BaseAddr, uint64_t SymVA) const { |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 185 | typedef ELFFile<ELF64LE>::Elf_Rela Elf_Rela; |
| 186 | auto &Rel = *reinterpret_cast<const Elf_Rela *>(RelP); |
| 187 | |
| 188 | uint64_t Offset = Rel.r_offset; |
Rui Ueyama | 87bc41b | 2015-10-06 18:54:43 +0000 | [diff] [blame] | 189 | uint8_t *Loc = Buf + Offset; |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 190 | switch (Type) { |
| 191 | case R_X86_64_PC32: |
Rafael Espindola | cdfecff | 2015-09-23 20:08:25 +0000 | [diff] [blame] | 192 | case R_X86_64_GOTPCREL: |
Rui Ueyama | 87bc41b | 2015-10-06 18:54:43 +0000 | [diff] [blame] | 193 | write32le(Loc, SymVA + Rel.r_addend - (BaseAddr + Offset)); |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 194 | break; |
| 195 | case R_X86_64_64: |
Rui Ueyama | 87bc41b | 2015-10-06 18:54:43 +0000 | [diff] [blame] | 196 | write64le(Loc, SymVA + Rel.r_addend); |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 197 | break; |
| 198 | case R_X86_64_32: { |
| 199 | case R_X86_64_32S: |
| 200 | uint64_t VA = SymVA + Rel.r_addend; |
| 201 | if (Type == R_X86_64_32 && !isUInt<32>(VA)) |
| 202 | error("R_X86_64_32 out of range"); |
| 203 | else if (!isInt<32>(VA)) |
| 204 | error("R_X86_64_32S out of range"); |
| 205 | |
Rui Ueyama | 87bc41b | 2015-10-06 18:54:43 +0000 | [diff] [blame] | 206 | write32le(Loc, VA); |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 207 | break; |
| 208 | } |
| 209 | default: |
Rui Ueyama | 1c42afc | 2015-10-12 15:49:06 +0000 | [diff] [blame] | 210 | error("unrecognized reloc " + Twine(Type)); |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 211 | } |
| 212 | } |
| 213 | |
Hal Finkel | 3c8cc67 | 2015-10-12 20:56:18 +0000 | [diff] [blame] | 214 | // Relocation masks following the #lo(value), #hi(value), #ha(value), |
| 215 | // #higher(value), #highera(value), #highest(value), and #highesta(value) |
| 216 | // macros defined in section 4.5.1. Relocation Types of the PPC-elf64abi |
| 217 | // document. |
| 218 | |
| 219 | static uint16_t applyPPCLo(uint64_t V) { return V & 0xffff; } |
| 220 | |
| 221 | static uint16_t applyPPCHi(uint64_t V) { return (V >> 16) & 0xffff; } |
| 222 | |
| 223 | static uint16_t applyPPCHa(uint64_t V) { return ((V + 0x8000) >> 16) & 0xffff; } |
| 224 | |
| 225 | static uint16_t applyPPCHigher(uint64_t V) { return (V >> 32) & 0xffff; } |
| 226 | |
| 227 | static uint16_t applyPPCHighera(uint64_t V) { |
| 228 | return ((V + 0x8000) >> 32) & 0xffff; |
| 229 | } |
| 230 | |
| 231 | static uint16_t applyPPCHighest(uint64_t V) { return V >> 48; } |
| 232 | |
| 233 | static uint16_t applyPPCHighesta(uint64_t V) { return (V + 0x8000) >> 48; } |
| 234 | |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 235 | PPC64TargetInfo::PPC64TargetInfo() { |
Hal Finkel | 3c8cc67 | 2015-10-12 20:56:18 +0000 | [diff] [blame] | 236 | PCRelReloc = R_PPC64_REL24; |
| 237 | GotReloc = R_PPC64_GLOB_DAT; |
| 238 | GotRefReloc = R_PPC64_REL64; |
Hal Finkel | be0823d | 2015-10-12 20:58:52 +0000 | [diff] [blame] | 239 | RelativeReloc = R_PPC64_RELATIVE; |
Hal Finkel | 6c2a3b8 | 2015-10-08 21:51:31 +0000 | [diff] [blame] | 240 | PltEntrySize = 32; |
Hal Finkel | c848b32 | 2015-10-12 19:34:29 +0000 | [diff] [blame] | 241 | |
| 242 | // We need 64K pages (at least under glibc/Linux, the loader won't |
| 243 | // set different permissions on a finer granularity than that). |
Hal Finkel | e3c2626 | 2015-10-08 22:23:54 +0000 | [diff] [blame] | 244 | PageSize = 65536; |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 245 | } |
Hal Finkel | 3c8cc67 | 2015-10-12 20:56:18 +0000 | [diff] [blame] | 246 | |
| 247 | static uint64_t getPPC64TocBase() { |
| 248 | // The TOC consists of sections .got, .toc, .tocbss, .plt in that |
| 249 | // order. The TOC starts where the first of these sections starts. |
| 250 | |
| 251 | // FIXME: This obviously does not do the right thing when there is no .got |
| 252 | // section, but there is a .toc or .tocbss section. |
| 253 | uint64_t TocVA = Out<ELF64BE>::Got->getVA(); |
| 254 | if (!TocVA) |
| 255 | TocVA = Out<ELF64BE>::Plt->getVA(); |
| 256 | |
| 257 | // Per the ppc64-elf-linux ABI, The TOC base is TOC value plus 0x8000 |
| 258 | // thus permitting a full 64 Kbytes segment. Note that the glibc startup |
| 259 | // code (crt1.o) assumes that you can get from the TOC base to the |
| 260 | // start of the .toc section with only a single (signed) 16-bit relocation. |
| 261 | return TocVA + 0x8000; |
| 262 | } |
| 263 | |
Rafael Espindola | c401088 | 2015-09-22 20:54:08 +0000 | [diff] [blame] | 264 | void PPC64TargetInfo::writePltEntry(uint8_t *Buf, uint64_t GotEntryAddr, |
Rui Ueyama | c58656c | 2015-10-13 16:59:30 +0000 | [diff] [blame] | 265 | uint64_t PltEntryAddr) const { |
Hal Finkel | 3c8cc67 | 2015-10-12 20:56:18 +0000 | [diff] [blame] | 266 | uint64_t Off = GotEntryAddr - getPPC64TocBase(); |
| 267 | |
| 268 | // FIXME: What we should do, in theory, is get the offset of the function |
| 269 | // descriptor in the .opd section, and use that as the offset from %r2 (the |
| 270 | // TOC-base pointer). Instead, we have the GOT-entry offset, and that will |
| 271 | // be a pointer to the function descriptor in the .opd section. Using |
| 272 | // this scheme is simpler, but requires an extra indirection per PLT dispatch. |
| 273 | |
| 274 | write32be(Buf, 0xf8410000); // std %r2, 40(%r1) |
| 275 | write32be(Buf + 4, 0x3d620000 | applyPPCHa(Off)); // addis %r11, %r2, X@ha |
| 276 | write32be(Buf + 8, 0xe98b0000 | applyPPCLo(Off)); // ld %r12, X@l(%r11) |
| 277 | write32be(Buf + 12, 0xe96c0000); // ld %r11,0(%r12) |
| 278 | write32be(Buf + 16, 0x7d6903a6); // mtctr %r11 |
| 279 | write32be(Buf + 20, 0xe84c0008); // ld %r2,8(%r12) |
| 280 | write32be(Buf + 24, 0xe96c0010); // ld %r11,16(%r12) |
| 281 | write32be(Buf + 28, 0x4e800420); // bctr |
| 282 | } |
| 283 | |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 284 | bool PPC64TargetInfo::relocNeedsGot(uint32_t Type, const SymbolBody &S) const { |
Hal Finkel | 3c8cc67 | 2015-10-12 20:56:18 +0000 | [diff] [blame] | 285 | if (relocNeedsPlt(Type, S)) |
| 286 | return true; |
| 287 | |
| 288 | switch (Type) { |
| 289 | default: return false; |
| 290 | case R_PPC64_GOT16: |
| 291 | case R_PPC64_GOT16_LO: |
| 292 | case R_PPC64_GOT16_HI: |
| 293 | case R_PPC64_GOT16_HA: |
| 294 | case R_PPC64_GOT16_DS: |
| 295 | case R_PPC64_GOT16_LO_DS: |
| 296 | return true; |
| 297 | } |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 298 | } |
Hal Finkel | 3c8cc67 | 2015-10-12 20:56:18 +0000 | [diff] [blame] | 299 | |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 300 | bool PPC64TargetInfo::relocNeedsPlt(uint32_t Type, const SymbolBody &S) const { |
Hal Finkel | 3c8cc67 | 2015-10-12 20:56:18 +0000 | [diff] [blame] | 301 | if (Type != R_PPC64_REL24) |
| 302 | return false; |
| 303 | |
| 304 | // These are function calls that need to be redirected through a PLT stub. |
| 305 | return S.isShared() || (S.isUndefined() && S.isWeak()); |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 306 | } |
Hal Finkel | 3c8cc67 | 2015-10-12 20:56:18 +0000 | [diff] [blame] | 307 | |
Hal Finkel | be0823d | 2015-10-12 20:58:52 +0000 | [diff] [blame] | 308 | bool PPC64TargetInfo::isRelRelative(uint32_t Type) const { |
| 309 | switch (Type) { |
| 310 | default: |
| 311 | return false; |
| 312 | case R_PPC64_REL24: |
| 313 | case R_PPC64_REL14: |
| 314 | case R_PPC64_REL14_BRTAKEN: |
| 315 | case R_PPC64_REL14_BRNTAKEN: |
| 316 | case R_PPC64_REL32: |
| 317 | case R_PPC64_REL64: |
| 318 | return true; |
| 319 | } |
| 320 | } |
| 321 | |
Hal Finkel | 87bbd5f | 2015-10-12 21:19:18 +0000 | [diff] [blame] | 322 | void PPC64TargetInfo::relocateOne(uint8_t *Buf, uint8_t *BufEnd, |
| 323 | const void *RelP, uint32_t Type, |
Rui Ueyama | af21d92 | 2015-10-08 20:06:07 +0000 | [diff] [blame] | 324 | uint64_t BaseAddr, uint64_t SymVA) const { |
Rafael Espindola | 3efa4e9 | 2015-09-22 21:12:55 +0000 | [diff] [blame] | 325 | typedef ELFFile<ELF64BE>::Elf_Rela Elf_Rela; |
| 326 | auto &Rel = *reinterpret_cast<const Elf_Rela *>(RelP); |
| 327 | |
Hal Finkel | 3c8cc67 | 2015-10-12 20:56:18 +0000 | [diff] [blame] | 328 | uint8_t *L = Buf + Rel.r_offset; |
| 329 | uint64_t S = SymVA; |
| 330 | int64_t A = Rel.r_addend; |
| 331 | uint64_t P = BaseAddr + Rel.r_offset; |
| 332 | uint64_t TB = getPPC64TocBase(); |
| 333 | |
| 334 | if (Type == R_PPC64_TOC) { |
| 335 | write64be(L, TB); |
| 336 | return; |
| 337 | } |
| 338 | |
| 339 | // For a TOC-relative relocation, adjust the addend and proceed in terms of |
| 340 | // the corresponding ADDR16 relocation type. |
Rafael Espindola | 3efa4e9 | 2015-09-22 21:12:55 +0000 | [diff] [blame] | 341 | switch (Type) { |
Hal Finkel | 3c8cc67 | 2015-10-12 20:56:18 +0000 | [diff] [blame] | 342 | case R_PPC64_TOC16: Type = R_PPC64_ADDR16; A -= TB; break; |
| 343 | case R_PPC64_TOC16_DS: Type = R_PPC64_ADDR16_DS; A -= TB; break; |
| 344 | case R_PPC64_TOC16_LO: Type = R_PPC64_ADDR16_LO; A -= TB; break; |
| 345 | case R_PPC64_TOC16_LO_DS: Type = R_PPC64_ADDR16_LO_DS; A -= TB; break; |
| 346 | case R_PPC64_TOC16_HI: Type = R_PPC64_ADDR16_HI; A -= TB; break; |
| 347 | case R_PPC64_TOC16_HA: Type = R_PPC64_ADDR16_HA; A -= TB; break; |
| 348 | default: break; |
| 349 | } |
| 350 | |
| 351 | uint64_t R = S + A; |
| 352 | |
| 353 | switch (Type) { |
| 354 | case R_PPC64_ADDR16: |
| 355 | write16be(L, applyPPCLo(R)); |
Rafael Espindola | 3efa4e9 | 2015-09-22 21:12:55 +0000 | [diff] [blame] | 356 | break; |
Hal Finkel | 3c8cc67 | 2015-10-12 20:56:18 +0000 | [diff] [blame] | 357 | case R_PPC64_ADDR16_DS: |
| 358 | if (!isInt<16>(R)) |
| 359 | error("Relocation R_PPC64_ADDR16_DS overflow"); |
| 360 | write16be(L, (read16be(L) & 3) | (R & ~3)); |
| 361 | break; |
| 362 | case R_PPC64_ADDR16_LO: |
| 363 | write16be(L, applyPPCLo(R)); |
| 364 | break; |
| 365 | case R_PPC64_ADDR16_LO_DS: |
| 366 | write16be(L, (read16be(L) & 3) | (applyPPCLo(R) & ~3)); |
| 367 | break; |
| 368 | case R_PPC64_ADDR16_HI: |
| 369 | write16be(L, applyPPCHi(R)); |
| 370 | break; |
| 371 | case R_PPC64_ADDR16_HA: |
| 372 | write16be(L, applyPPCHa(R)); |
| 373 | break; |
| 374 | case R_PPC64_ADDR16_HIGHER: |
| 375 | write16be(L, applyPPCHigher(R)); |
| 376 | break; |
| 377 | case R_PPC64_ADDR16_HIGHERA: |
| 378 | write16be(L, applyPPCHighera(R)); |
| 379 | break; |
| 380 | case R_PPC64_ADDR16_HIGHEST: |
| 381 | write16be(L, applyPPCHighest(R)); |
| 382 | break; |
| 383 | case R_PPC64_ADDR16_HIGHESTA: |
| 384 | write16be(L, applyPPCHighesta(R)); |
| 385 | break; |
| 386 | case R_PPC64_ADDR14: { |
| 387 | if ((R & 3) != 0) |
| 388 | error("Improper alignment for relocation R_PPC64_ADDR14"); |
| 389 | |
| 390 | // Preserve the AA/LK bits in the branch instruction |
| 391 | uint8_t AALK = L[3]; |
| 392 | write16be(L + 2, (AALK & 3) | (R & 0xfffc)); |
| 393 | break; |
| 394 | } |
| 395 | case R_PPC64_REL16_LO: |
| 396 | write16be(L, applyPPCLo(R - P)); |
| 397 | break; |
| 398 | case R_PPC64_REL16_HI: |
| 399 | write16be(L, applyPPCHi(R - P)); |
| 400 | break; |
| 401 | case R_PPC64_REL16_HA: |
| 402 | write16be(L, applyPPCHa(R - P)); |
| 403 | break; |
| 404 | case R_PPC64_ADDR32: |
| 405 | if (!isInt<32>(R)) |
| 406 | error("Relocation R_PPC64_ADDR32 overflow"); |
| 407 | write32be(L, R); |
| 408 | break; |
| 409 | case R_PPC64_REL24: { |
Hal Finkel | daedc12 | 2015-10-12 23:16:53 +0000 | [diff] [blame] | 410 | uint64_t PltStart = Out<ELF64BE>::Plt->getVA(); |
| 411 | uint64_t PltEnd = PltStart + Out<ELF64BE>::Plt->getSize(); |
| 412 | bool InPlt = PltStart <= S + A && S + A < PltEnd; |
| 413 | |
| 414 | if (!InPlt && Out<ELF64BE>::Opd) { |
| 415 | // If this is a local call, and we currently have the address of a |
| 416 | // function-descriptor, get the underlying code address instead. |
| 417 | uint64_t OpdStart = Out<ELF64BE>::Opd->getVA(); |
| 418 | uint64_t OpdEnd = OpdStart + Out<ELF64BE>::Opd->getSize(); |
| 419 | bool InOpd = OpdStart <= S + A && S + A < OpdEnd; |
| 420 | |
| 421 | if (InOpd) |
| 422 | R = read64be(&Out<ELF64BE>::OpdBuf[S + A - OpdStart]); |
| 423 | } |
| 424 | |
Hal Finkel | 3c8cc67 | 2015-10-12 20:56:18 +0000 | [diff] [blame] | 425 | uint32_t Mask = 0x03FFFFFC; |
| 426 | if (!isInt<24>(R - P)) |
| 427 | error("Relocation R_PPC64_REL24 overflow"); |
| 428 | write32be(L, (read32be(L) & ~Mask) | ((R - P) & Mask)); |
Hal Finkel | 87bbd5f | 2015-10-12 21:19:18 +0000 | [diff] [blame] | 429 | |
Hal Finkel | 515ed44 | 2015-10-13 20:31:33 +0000 | [diff] [blame] | 430 | if (InPlt && L + 8 <= BufEnd && |
Hal Finkel | 87bbd5f | 2015-10-12 21:19:18 +0000 | [diff] [blame] | 431 | read32be(L + 4) == 0x60000000 /* nop */) |
| 432 | write32be(L + 4, 0xe8410028); // ld %r2, 40(%r1) |
Hal Finkel | 3c8cc67 | 2015-10-12 20:56:18 +0000 | [diff] [blame] | 433 | break; |
| 434 | } |
| 435 | case R_PPC64_REL32: |
| 436 | if (!isInt<32>(R - P)) |
| 437 | error("Relocation R_PPC64_REL32 overflow"); |
| 438 | write32be(L, R - P); |
| 439 | break; |
| 440 | case R_PPC64_REL64: |
| 441 | write64be(L, R - P); |
| 442 | break; |
| 443 | case R_PPC64_ADDR64: |
| 444 | write64be(L, R); |
Rafael Espindola | 3efa4e9 | 2015-09-22 21:12:55 +0000 | [diff] [blame] | 445 | break; |
| 446 | default: |
Rui Ueyama | 1c42afc | 2015-10-12 15:49:06 +0000 | [diff] [blame] | 447 | error("unrecognized reloc " + Twine(Type)); |
Rafael Espindola | 3efa4e9 | 2015-09-22 21:12:55 +0000 | [diff] [blame] | 448 | } |
| 449 | } |
Rafael Espindola | 1d6063e | 2015-09-22 21:24:52 +0000 | [diff] [blame] | 450 | |
| 451 | PPCTargetInfo::PPCTargetInfo() { |
| 452 | // PCRelReloc = FIXME |
Rafael Espindola | 7f07442 | 2015-09-22 21:35:51 +0000 | [diff] [blame] | 453 | // GotReloc = FIXME |
Hal Finkel | e3c2626 | 2015-10-08 22:23:54 +0000 | [diff] [blame] | 454 | PageSize = 65536; |
Rafael Espindola | 1d6063e | 2015-09-22 21:24:52 +0000 | [diff] [blame] | 455 | } |
| 456 | void PPCTargetInfo::writePltEntry(uint8_t *Buf, uint64_t GotEntryAddr, |
Rui Ueyama | c58656c | 2015-10-13 16:59:30 +0000 | [diff] [blame] | 457 | uint64_t PltEntryAddr) const {} |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 458 | bool PPCTargetInfo::relocNeedsGot(uint32_t Type, const SymbolBody &S) const { |
| 459 | return false; |
| 460 | } |
| 461 | bool PPCTargetInfo::relocNeedsPlt(uint32_t Type, const SymbolBody &S) const { |
| 462 | return false; |
| 463 | } |
Hal Finkel | 87bbd5f | 2015-10-12 21:19:18 +0000 | [diff] [blame] | 464 | void PPCTargetInfo::relocateOne(uint8_t *Buf, uint8_t *BufEnd, |
| 465 | const void *RelP, uint32_t Type, |
Rui Ueyama | af21d92 | 2015-10-08 20:06:07 +0000 | [diff] [blame] | 466 | uint64_t BaseAddr, uint64_t SymVA) const {} |
Rafael Espindola | 1d6063e | 2015-09-22 21:24:52 +0000 | [diff] [blame] | 467 | |
Davide Italiano | cde9336 | 2015-09-26 00:32:04 +0000 | [diff] [blame] | 468 | AArch64TargetInfo::AArch64TargetInfo() { |
| 469 | // PCRelReloc = FIXME |
| 470 | // GotReloc = FIXME |
| 471 | } |
| 472 | void AArch64TargetInfo::writePltEntry(uint8_t *Buf, uint64_t GotEntryAddr, |
Rui Ueyama | c58656c | 2015-10-13 16:59:30 +0000 | [diff] [blame] | 473 | uint64_t PltEntryAddr) const {} |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 474 | bool AArch64TargetInfo::relocNeedsGot(uint32_t Type, |
| 475 | const SymbolBody &S) const { |
| 476 | return false; |
| 477 | } |
| 478 | bool AArch64TargetInfo::relocNeedsPlt(uint32_t Type, |
| 479 | const SymbolBody &S) const { |
| 480 | return false; |
| 481 | } |
Davide Italiano | 1d750a6 | 2015-09-27 08:45:38 +0000 | [diff] [blame] | 482 | |
Davide Italiano | ef4be6b | 2015-10-06 19:01:32 +0000 | [diff] [blame] | 483 | static void updateAArch64Adr(uint8_t *L, uint64_t Imm) { |
Davide Italiano | 1f31a2c | 2015-10-02 22:00:42 +0000 | [diff] [blame] | 484 | uint32_t ImmLo = (Imm & 0x3) << 29; |
| 485 | uint32_t ImmHi = ((Imm & 0x1FFFFC) >> 2) << 5; |
| 486 | uint64_t Mask = (0x3 << 29) | (0x7FFFF << 5); |
Rui Ueyama | 87bc41b | 2015-10-06 18:54:43 +0000 | [diff] [blame] | 487 | write32le(L, (read32le(L) & ~Mask) | ImmLo | ImmHi); |
Davide Italiano | 1f31a2c | 2015-10-02 22:00:42 +0000 | [diff] [blame] | 488 | } |
| 489 | |
Davide Italiano | 318ca22 | 2015-10-02 22:13:51 +0000 | [diff] [blame] | 490 | // Page(Expr) is the page address of the expression Expr, defined |
| 491 | // as (Expr & ~0xFFF). (This applies even if the machine page size |
Davide Italiano | d9b5be4 | 2015-10-02 22:17:09 +0000 | [diff] [blame] | 492 | // supported by the platform has a different value.) |
Davide Italiano | ef4be6b | 2015-10-06 19:01:32 +0000 | [diff] [blame] | 493 | static uint64_t getAArch64Page(uint64_t Expr) { |
Davide Italiano | 318ca22 | 2015-10-02 22:13:51 +0000 | [diff] [blame] | 494 | return Expr & (~static_cast<uint64_t>(0xFFF)); |
Davide Italiano | 1f31a2c | 2015-10-02 22:00:42 +0000 | [diff] [blame] | 495 | } |
| 496 | |
Hal Finkel | 87bbd5f | 2015-10-12 21:19:18 +0000 | [diff] [blame] | 497 | void AArch64TargetInfo::relocateOne(uint8_t *Buf, uint8_t *BufEnd, |
| 498 | const void *RelP, uint32_t Type, |
| 499 | uint64_t BaseAddr, uint64_t SymVA) const { |
Davide Italiano | 1d750a6 | 2015-09-27 08:45:38 +0000 | [diff] [blame] | 500 | typedef ELFFile<ELF64LE>::Elf_Rela Elf_Rela; |
| 501 | auto &Rel = *reinterpret_cast<const Elf_Rela *>(RelP); |
| 502 | |
Rui Ueyama | ee8c53b | 2015-10-06 19:57:01 +0000 | [diff] [blame] | 503 | uint8_t *L = Buf + Rel.r_offset; |
Davide Italiano | 1d750a6 | 2015-09-27 08:45:38 +0000 | [diff] [blame] | 504 | uint64_t S = SymVA; |
| 505 | int64_t A = Rel.r_addend; |
| 506 | uint64_t P = BaseAddr + Rel.r_offset; |
| 507 | switch (Type) { |
Davide Italiano | df88f96 | 2015-10-04 00:59:16 +0000 | [diff] [blame] | 508 | case R_AARCH64_ABS16: |
Rui Ueyama | ee8c53b | 2015-10-06 19:57:01 +0000 | [diff] [blame] | 509 | if (!isInt<16>(S + A)) |
| 510 | error("Relocation R_AARCH64_ABS16 out of range"); |
Davide Italiano | 06d8432 | 2015-10-07 22:10:02 +0000 | [diff] [blame] | 511 | write16le(L, S + A); |
Davide Italiano | df88f96 | 2015-10-04 00:59:16 +0000 | [diff] [blame] | 512 | break; |
| 513 | case R_AARCH64_ABS32: |
Rui Ueyama | ee8c53b | 2015-10-06 19:57:01 +0000 | [diff] [blame] | 514 | if (!isInt<32>(S + A)) |
| 515 | error("Relocation R_AARCH64_ABS32 out of range"); |
Davide Italiano | 06d8432 | 2015-10-07 22:10:02 +0000 | [diff] [blame] | 516 | write32le(L, S + A); |
Davide Italiano | df88f96 | 2015-10-04 00:59:16 +0000 | [diff] [blame] | 517 | break; |
| 518 | case R_AARCH64_ABS64: |
Rui Ueyama | ee8c53b | 2015-10-06 19:57:01 +0000 | [diff] [blame] | 519 | // No overflow check needed. |
Davide Italiano | 06d8432 | 2015-10-07 22:10:02 +0000 | [diff] [blame] | 520 | write64le(L, S + A); |
Davide Italiano | df88f96 | 2015-10-04 00:59:16 +0000 | [diff] [blame] | 521 | break; |
Davide Italiano | 0b6974b | 2015-10-03 19:56:07 +0000 | [diff] [blame] | 522 | case R_AARCH64_ADD_ABS_LO12_NC: |
Rui Ueyama | ee8c53b | 2015-10-06 19:57:01 +0000 | [diff] [blame] | 523 | // No overflow check needed. |
| 524 | or32le(L, ((S + A) & 0xFFF) << 10); |
Davide Italiano | 0b6974b | 2015-10-03 19:56:07 +0000 | [diff] [blame] | 525 | break; |
Rui Ueyama | ee8c53b | 2015-10-06 19:57:01 +0000 | [diff] [blame] | 526 | case R_AARCH64_ADR_PREL_LO21: { |
| 527 | uint64_t X = S + A - P; |
| 528 | if (!isInt<21>(X)) |
| 529 | error("Relocation R_AARCH64_ADR_PREL_LO21 out of range"); |
| 530 | updateAArch64Adr(L, X & 0x1FFFFF); |
Davide Italiano | 1d750a6 | 2015-09-27 08:45:38 +0000 | [diff] [blame] | 531 | break; |
Rui Ueyama | ee8c53b | 2015-10-06 19:57:01 +0000 | [diff] [blame] | 532 | } |
| 533 | case R_AARCH64_ADR_PREL_PG_HI21: { |
| 534 | uint64_t X = getAArch64Page(S + A) - getAArch64Page(P); |
| 535 | if (!isInt<33>(X)) |
| 536 | error("Relocation R_AARCH64_ADR_PREL_PG_HI21 out of range"); |
| 537 | updateAArch64Adr(L, (X >> 12) & 0x1FFFFF); // X[32:12] |
Davide Italiano | 1f31a2c | 2015-10-02 22:00:42 +0000 | [diff] [blame] | 538 | break; |
Rui Ueyama | ee8c53b | 2015-10-06 19:57:01 +0000 | [diff] [blame] | 539 | } |
Davide Italiano | 1d750a6 | 2015-09-27 08:45:38 +0000 | [diff] [blame] | 540 | default: |
Rui Ueyama | 1c42afc | 2015-10-12 15:49:06 +0000 | [diff] [blame] | 541 | error("unrecognized reloc " + Twine(Type)); |
Davide Italiano | 1d750a6 | 2015-09-27 08:45:38 +0000 | [diff] [blame] | 542 | } |
| 543 | } |
Simon Atanasyan | 49829a1 | 2015-09-29 05:34:03 +0000 | [diff] [blame] | 544 | |
| 545 | MipsTargetInfo::MipsTargetInfo() { |
| 546 | // PCRelReloc = FIXME |
| 547 | // GotReloc = FIXME |
Hal Finkel | e3c2626 | 2015-10-08 22:23:54 +0000 | [diff] [blame] | 548 | PageSize = 65536; |
Simon Atanasyan | 49829a1 | 2015-09-29 05:34:03 +0000 | [diff] [blame] | 549 | } |
| 550 | |
| 551 | void MipsTargetInfo::writePltEntry(uint8_t *Buf, uint64_t GotEntryAddr, |
Rui Ueyama | c58656c | 2015-10-13 16:59:30 +0000 | [diff] [blame] | 552 | uint64_t PltEntryAddr) const {} |
Simon Atanasyan | 49829a1 | 2015-09-29 05:34:03 +0000 | [diff] [blame] | 553 | |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 554 | bool MipsTargetInfo::relocNeedsGot(uint32_t Type, const SymbolBody &S) const { |
| 555 | return false; |
| 556 | } |
Simon Atanasyan | 49829a1 | 2015-09-29 05:34:03 +0000 | [diff] [blame] | 557 | |
Rafael Espindola | 3ef3a4c | 2015-09-29 23:22:16 +0000 | [diff] [blame] | 558 | bool MipsTargetInfo::relocNeedsPlt(uint32_t Type, const SymbolBody &S) const { |
| 559 | return false; |
| 560 | } |
Simon Atanasyan | 49829a1 | 2015-09-29 05:34:03 +0000 | [diff] [blame] | 561 | |
Hal Finkel | 87bbd5f | 2015-10-12 21:19:18 +0000 | [diff] [blame] | 562 | void MipsTargetInfo::relocateOne(uint8_t *Buf, uint8_t *BufEnd, |
| 563 | const void *RelP, uint32_t Type, |
Simon Atanasyan | 3b732ac | 2015-10-12 15:10:02 +0000 | [diff] [blame] | 564 | uint64_t BaseAddr, uint64_t SymVA) const { |
| 565 | typedef ELFFile<ELF32LE>::Elf_Rel Elf_Rel; |
| 566 | auto &Rel = *reinterpret_cast<const Elf_Rel *>(RelP); |
| 567 | |
| 568 | switch (Type) { |
| 569 | case R_MIPS_32: |
| 570 | add32le(Buf + Rel.r_offset, SymVA); |
| 571 | break; |
| 572 | default: |
Rui Ueyama | 1c42afc | 2015-10-12 15:49:06 +0000 | [diff] [blame] | 573 | error("unrecognized reloc " + Twine(Type)); |
Simon Atanasyan | 3b732ac | 2015-10-12 15:10:02 +0000 | [diff] [blame] | 574 | } |
| 575 | } |
Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 576 | } |
| 577 | } |