Cause B programs to fail on startup if they detect alignment issues.
This commit is contained in:
parent
94867d24b7
commit
c9d14f6c9e
|
@ -14,6 +14,8 @@
|
|||
#error Unsupported EM_PSIZE
|
||||
#endif
|
||||
|
||||
#define MASK ((1<<SHIFT)-1)
|
||||
|
||||
extern FILE* input_unit;
|
||||
extern FILE* output_unit;
|
||||
|
||||
|
|
|
@ -173,6 +173,8 @@ void patch_addresses(uintptr_t** p)
|
|||
while (*p)
|
||||
{
|
||||
uintptr_t* q = *p++;
|
||||
if (*q & MASK)
|
||||
abort();
|
||||
*q >>= SHIFT;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue