Fix a couple bugs in FBT PowerPC. Clamp the size to a 'instruction size' not
'byte size', and fix a typo. MFC after: 2 weeks
This commit is contained in:
parent
a6c26592f1
commit
a76f5d59f4
@ -219,7 +219,7 @@ fbt_provide_module_function(linker_file_t lf, int symindx,
|
||||
return (0);
|
||||
|
||||
instr = (u_int32_t *) symval->value;
|
||||
limit = (u_int32_t *) (symval->value + symval->size);
|
||||
limit = (u_int32_t *) (symval->value + symval->size / sizeof(u_int32_t));
|
||||
|
||||
for (; instr < limit; instr++)
|
||||
if (*instr == FBT_MFLR_R0)
|
||||
@ -278,7 +278,7 @@ fbt_provide_module_function(linker_file_t lf, int symindx,
|
||||
instr++;
|
||||
|
||||
for (j = 0; j < 12 && instr < limit; j++, instr++) {
|
||||
if ((*instr == FBT_BCTR) || (*instr == FBT_BLR) |
|
||||
if ((*instr == FBT_BCTR) || (*instr == FBT_BLR) ||
|
||||
FBT_IS_JUMP(*instr))
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user