PLC-lang / rusty

Structured Text Parser and LLVM Frontend
GNU Lesser General Public License v3.0
223 stars 53 forks source link

Allow compiling online-change-example for reloadable runtime #1268

Closed CohenArthur closed 2 months ago

CohenArthur commented 3 months ago

Hi everyone, here is the PR containing all of the changes we had to make to the compiler in order to try and get online-change-example to work with our runtime. I will self-review the PR and add notes concerning certain workarounds we had to make

TheColonel2688 commented 3 months ago

@CohenArthur what is your runtime? Have a link? I am curious to check it out.

ghaith commented 3 months ago

@CohenArthur what is your runtime? Have a link? I am curious to check it out.

We can't share much about the effective runtime, but this should be similar for any runtime. Once you load the application, you need to choose which functions/programs to call. These are symbols you would track in your runtime. (See dlopen)

The way this is designed to work is that we create a custom GOT so that we have access from within the runtime to change the location of the symbols to enable online change. Once we have it integrated i'll try to add more information in the book on how to do this from a theoretical runtime.

ghaith commented 2 months ago

Closing in favor of #1319 as I can't update the embecosm branch.