From: Luke Kenneth Casson Leighton Date: Wed, 8 Jul 2020 17:26:16 +0000 (+0100) Subject: switch assembler to little-endian X-Git-Tag: div_pipeline~151 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=339b9e071741f926a745e1a1fff706e8a852b99a;p=soc.git switch assembler to little-endian --- diff --git a/src/soc/simulator/program.py b/src/soc/simulator/program.py index 4cf9b9ff..2f3d88b3 100644 --- a/src/soc/simulator/program.py +++ b/src/soc/simulator/program.py @@ -13,9 +13,15 @@ import sys filedir = os.path.dirname(os.path.realpath(__file__)) memmap = os.path.join(filedir, "memmap") -bigendian = True -endian_fmt = "elf64-big" -obj_fmt = "-be" +bigendian = False +if bigendian: + endian_fmt = "elf64-big" + obj_fmt = "-be" + ld_fmt = "-EB" +else: + ld_fmt = "-EL" + endian_fmt = "elf64-little" + obj_fmt = "-le" class Program: @@ -49,6 +55,7 @@ class Program: def _link(self, ofile): with tempfile.NamedTemporaryFile(suffix=".elf") as elffile: args = ["powerpc64-linux-gnu-ld", + ld_fmt, "-o", elffile.name, "-T", memmap, ofile.name]