[Libre-soc-bugs] [Bug 1169] Add ELF and mmap support to ISACaller -- no dynamic linking

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Fri Dec 1 21:19:56 GMT 2023


https://bugs.libre-soc.org/show_bug.cgi?id=1169

--- Comment #51 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #50)
> (In reply to Jacob Lifshay from comment #48)
> > (In reply to Luke Kenneth Casson Leighton from comment #45)
> > > rebased against master for you
> > 
> > unfortunately you managed to rebase master onto 1169-elf-support, 
> 
> huhn moo? i typed "git rebase master" in the 1169-elf-branch. shold
> work, right?

well, something messed up. I like to use rebase -i so I can see what it's
doing.

I rebased again, but since master already had an import os, i edited the commit
with from os import readlink to just use os.readlink and dropped the commit
that did that change again.

I also added a new commit after rebasing. I ran tests (but aborted when it got
to 99%, i don't want to wait 1hr for powmod), they passed.

log with branches, so you can see i got the rebase the right way around this
time:

https://git.libre-soc.org/?p=openpower-isa.git;a=shortlog;h=1d45949e369d92c0cbd41b2c247a5bae9c37e11b

commit 1d45949e369d92c0cbd41b2c247a5bae9c37e11b (HEAD -> 1169-elf-support,
origin/1169-elf-support)
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Fri Dec 1 12:57:34 2023 -0800

    elf/simple_cases: deepcopy is unnecessary, call dict.copy

commit 1f1714a2d38941f488c3e31b891568ca3794b519
Author: Luke Kenneth Casson Leighton <lkcl at lkcl.net>
Date:   Fri Dec 1 17:49:51 2023 +0000

    bug 1169: elf-support correct syntax errors

commit 25435266ec9608aa71dc65116430ef2a72ea5360
Author: Luke Kenneth Casson Leighton <lkcl at lkcl.net>
Date:   Fri Dec 1 14:42:25 2023 +0000

    bug 1169: elf support, minor coding style adjustment, clearer

commit 76f6a80d1032e434caf040a1ed93b60e5c010a99
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Fri Dec 1 01:17:05 2023 -0800

    openpower/test/elf/simple_cases: add some simple ELF test cases

commit 5b91e9f2e0c40a524bb5dd3f9adbcf856ea72d1e
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu Nov 30 23:55:41 2023 -0800

    add utilities for testing ELF files

commit 74537736287a035dde84a83d2c72245936babf10
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu Nov 30 23:54:48 2023 -0800

    SimRunner: support running an ELFFile

commit bab7beab9183331c66ab9e733f71665a8a513498
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu Nov 30 23:51:08 2023 -0800

    ISACaller: support loading an ELFFile

commit 5c1b59a76b4cf4be53b6c7e0f216bd9a18f8cf0d
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu Nov 30 23:46:50 2023 -0800

    mem.py: add load_elf

commit 2737991fb0001c56ca182bdc97903075c2659e33
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu Nov 30 23:40:51 2023 -0800

    mem.py: fix SIGBUS when accessing file mapped by mmap_syscall

    this fixes SIGBUS errors caused by accessing beyond the end of a
    file but still in the last page of the file, which is a valid thing to
    do, except that we have to account for host pages having a different
    size than emulated pages and map zeros to fill out the rest of the
    emulated page.

commit 46b65d91b6d43be1bd4531616438f533d220b09e
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu Nov 30 23:29:18 2023 -0800

    caller.py: implement write syscall

commit 706bc79c356283f3bcaee817b3dab2f0e4a59ef2
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu Nov 30 23:27:48 2023 -0800

    caller.py: implement exit_group syscall

commit 6012b9744813c6e56ed1406bdd8036224b41417e
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Thu Nov 30 23:15:45 2023 -0800

    ISACaller: fix syscall emulation

    there were two bugs fixed:
    1. sc emulation was missing a `return`, so it tried to run sc
       again after running sc and rfid, giving the wrong CIA and
       MSR values.
    2. the code to replace and restore the instruction with rfid
       had the wrong endian on the load, so it was corrupting the
       instruction for the next time it was used. I just deleted
       the save/replace/restore code since it isn't needed anymore.

    I then changed the syscall tests to ensure both the
    bugs above don't happen again.

commit cfc88640e740fe4e0cb4c350c95f6cb2eb6b049b
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Wed Nov 29 19:04:26 2023 -0800

    setup: add pyelftools v0.30 as dependency

commit c45ea4254c9e5cbcd357749fefc34a44044c8c65
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Sun Nov 26 21:43:46 2023 -0800

    add g++-powerpc64le-linux-gnu to .gitlab-ci.yml

commit eeb3d2031396f9d4bc8f377344c7f5940eae8b9e
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Sun Nov 26 19:14:21 2023 -0800

    add mmap_syscall tests

commit 5dc69f649cd8919dac6d6be01e6357cb086cadb0
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Sun Nov 26 19:13:25 2023 -0800

    implement MemMMap.mmap_syscall

commit 5f21b2e6093390c1f4c48331781d395357c58386
Author: Jacob Lifshay <programmerjake at gmail.com>
Date:   Sun Nov 26 19:11:35 2023 -0800

    add ppc_flags.py so we can get the ppc versions of all the flags we need

    tells gcc to dump all #defines, and parses that.

commit 5072485f66e9f680892320886bd0b76a5438a0b7 (origin/master, origin/HEAD,
master)
Author: Luke Kenneth Casson Leighton <lkcl at lkcl.net>
Date:   Fri Dec 1 17:57:12 2023 +0000

    replace print() with log()

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list