Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate global variable accesses and function calls to go via the custom GOT #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Jun 19, 2024

  1. feat: Access references to globals through a custom GOT

    This commit introduces the association of GOT indices to the LLVM index,
    which then allows us to utilise that when generating references to
    variables to check if a given variable has an entry in the GOT. If so,
    we obtain its index, and generate the necessary LLVM IR to access the
    address contained within the GOT rather than accessing the variable
    directly.
    lewis-revill committed Jun 19, 2024
    Configuration menu
    Copy the full SHA
    3a0e1a5 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2024

  1. feat: Generate calls via the GOT

    This change involves moving the generation of the GOT from
    variable_generator.rs to codegen.rs, in order to also cover not only
    global variables but also functions and 'programs' too. Once these have
    been given an associated index in the GOT we can use that to replace
    normal direct function calls with indirect calls to a function pointer
    stored in the GOT. We don't do this for calls with external linkage
    since these won't be subject to online change.
    lewis-revill committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    c9a08a9 View commit details
    Browse the repository at this point in the history