| Index: src/serialize.cc
|
| diff --git a/src/serialize.cc b/src/serialize.cc
|
| index f14031687561dda113a46bbcb1332b33cdf33adb..670f9da8ffb3b2ca0272c7e4fd18e1c9469a28ee 100644
|
| --- a/src/serialize.cc
|
| +++ b/src/serialize.cc
|
| @@ -899,6 +899,23 @@ void Deserializer::ReadObject(int space_number, Object** write_back) {
|
| DCHECK(space_number != CODE_SPACE);
|
| }
|
| #endif
|
| +#if V8_TARGET_ARCH_PPC && \
|
| + (ABI_USES_FUNCTION_DESCRIPTORS || V8_OOL_CONSTANT_POOL)
|
| + // If we're on a platform that uses function descriptors
|
| + // these jump tables make use of RelocInfo::INTERNAL_REFERENCE.
|
| + // As the V8 serialization code doesn't handle that relocation type
|
| + // we use this to fix up code that has function descriptors.
|
| + if (space_number == CODE_SPACE) {
|
| + Code* code = reinterpret_cast<Code*>(HeapObject::FromAddress(address));
|
| + for (RelocIterator it(code); !it.done(); it.next()) {
|
| + RelocInfo::Mode rmode = it.rinfo()->rmode();
|
| + if (rmode == RelocInfo::INTERNAL_REFERENCE) {
|
| + Assembler::RelocateInternalReference(it.rinfo()->pc(), 0,
|
| + code->instruction_start());
|
| + }
|
| + }
|
| + }
|
| +#endif
|
| }
|
|
|
|
|
|
|