mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Fix constant alignment on macOS
This commit is contained in:
parent
bd7c119e4b
commit
19a3bfec3b
@ -281,7 +281,12 @@ fn define_all_allocs(
|
|||||||
|
|
||||||
let mut data_ctx = DataContext::new();
|
let mut data_ctx = DataContext::new();
|
||||||
|
|
||||||
data_ctx.define(alloc.bytes.to_vec().into_boxed_slice());
|
let mut bytes = alloc.bytes.to_vec();
|
||||||
|
// The machO backend of faerie doesn't align data objects correctly unless we do this.
|
||||||
|
while bytes.len() as u64 % 16 != 0 {
|
||||||
|
bytes.push(0xde);
|
||||||
|
}
|
||||||
|
data_ctx.define(bytes.into_boxed_slice());
|
||||||
|
|
||||||
for &(offset, (_tag, reloc)) in alloc.relocations.iter() {
|
for &(offset, (_tag, reloc)) in alloc.relocations.iter() {
|
||||||
let addend = {
|
let addend = {
|
||||||
|
Loading…
Reference in New Issue
Block a user