macho: redo selection of segment/section for decls and consts

* fix alignment issues for consts with natural ABI alignment not
  matching that of the `ldr` instruction in `aarch64` - solved by
  preceeding the `ldr` with an additional `add` instruction to form
  the full address before dereferencing the pointer.
* redo selection of segment/section for decls and consts based on
  combined type and value
This commit is contained in:
Jakub Konka
2022-02-25 15:26:24 +01:00
parent bf6540ce50
commit 1b8ed7842c
6 changed files with 110 additions and 114 deletions

View File

@@ -195,9 +195,6 @@ test "multiline string comments at multiple places" {
}
test "string concatenation" {
if (builtin.zig_backend == .stage2_aarch64 and builtin.os.tag == .macos) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag == .macos) return error.SkipZigTest;
try expect(mem.eql(u8, "OK" ++ " IT " ++ "WORKED", "OK IT WORKED"));
}