authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-10-23 03:39:58+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-10-23 09:27:17+02:00
logfb2c02929e9325d2912d7d0bab1eb501b747c496
tree20e74c8411957e9f9ade56e9434ab70b05c1c273
parentfc48f8aa553e3d0c03393d976e36f217099cab25
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.pie: add microblaze support


1 files changed, 6 insertions(+), 0 deletions(-)

lib/std/pie.zig+6
...@@ -13,6 +13,7 @@ const R_CSKY_RELATIVE = 9;...@@ -13,6 +13,7 @@ const R_CSKY_RELATIVE = 9;
13const R_HEXAGON_RELATIVE = 35;13const R_HEXAGON_RELATIVE = 35;
14const R_LARCH_RELATIVE = 3;14const R_LARCH_RELATIVE = 3;
15const R_68K_RELATIVE = 22;15const R_68K_RELATIVE = 22;
16const R_MICROBLAZE_REL = 16;
16const R_MIPS_RELATIVE = 128;17const R_MIPS_RELATIVE = 128;
17const R_OR1K_RELATIVE = 21;18const R_OR1K_RELATIVE = 21;
18const R_PPC_RELATIVE = 22;19const R_PPC_RELATIVE = 22;
...@@ -31,6 +32,7 @@ const R_RELATIVE = switch (builtin.cpu.arch) {...@@ -31,6 +32,7 @@ const R_RELATIVE = switch (builtin.cpu.arch) {
31 .hexagon => R_HEXAGON_RELATIVE,32 .hexagon => R_HEXAGON_RELATIVE,
32 .loongarch32, .loongarch64 => R_LARCH_RELATIVE,33 .loongarch32, .loongarch64 => R_LARCH_RELATIVE,
33 .m68k => R_68K_RELATIVE,34 .m68k => R_68K_RELATIVE,
35 .microblaze, .microblazeel => R_MICROBLAZE_REL,
34 .mips, .mipsel, .mips64, .mips64el => R_MIPS_RELATIVE,36 .mips, .mipsel, .mips64, .mips64el => R_MIPS_RELATIVE,
35 .or1k => R_OR1K_RELATIVE,37 .or1k => R_OR1K_RELATIVE,
36 .powerpc, .powerpcle, .powerpc64, .powerpc64le => R_PPC_RELATIVE,38 .powerpc, .powerpcle, .powerpc64, .powerpc64le => R_PPC_RELATIVE,
...@@ -129,6 +131,10 @@ inline fn getDynamicSymbol() [*]const elf.Dyn {...@@ -129,6 +131,10 @@ inline fn getDynamicSymbol() [*]const elf.Dyn {
129 \\ lea (%[ret], %%pc), %[ret]131 \\ lea (%[ret], %%pc), %[ret]
130 : [ret] "=r" (-> [*]const elf.Dyn),132 : [ret] "=r" (-> [*]const elf.Dyn),
131 ),133 ),
134 .microblaze, .microblazeel => asm volatile (
135 \\ lwi %[ret], r20, 0
136 : [ret] "=r" (-> [*]const elf.Dyn),
137 ),
132 .mips, .mipsel => asm volatile (138 .mips, .mipsel => asm volatile (
133 \\ .weak _DYNAMIC139 \\ .weak _DYNAMIC
134 \\ .hidden _DYNAMIC140 \\ .hidden _DYNAMIC