equal
deleted
inserted
replaced
279 int patch_loc = CodeBuffer::locator(branch_pc - base, index()); |
279 int patch_loc = CodeBuffer::locator(branch_pc - base, index()); |
280 L.add_patch_at(outer(), patch_loc); |
280 L.add_patch_at(outer(), patch_loc); |
281 |
281 |
282 // Need to return a pc, doesn't matter what it is since it will be |
282 // Need to return a pc, doesn't matter what it is since it will be |
283 // replaced during resolution later. |
283 // replaced during resolution later. |
284 // (Don't return NULL or badAddress, since branches shouldn't overflow.) |
284 // Don't return NULL or badAddress, since branches shouldn't overflow. |
285 return base; |
285 // Don't return base either because that could overflow displacements |
|
286 // for shorter branches. It will get checked when bound. |
|
287 return branch_pc; |
286 } |
288 } |
287 } |
289 } |
288 |
290 |
289 void CodeSection::relocate(address at, RelocationHolder const& spec, int format) { |
291 void CodeSection::relocate(address at, RelocationHolder const& spec, int format) { |
290 Relocation* reloc = spec.reloc(); |
292 Relocation* reloc = spec.reloc(); |