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

Relocation and analysis improvement for Renesas RX #4461

Merged
merged 7 commits into from
May 1, 2024

Conversation

Heersin
Copy link
Member

@Heersin Heersin commented Apr 26, 2024

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

  • stack pointer
  • relocation for rx-elf obj
  • mnemonic sdb

Test plan

Test with an rx-elf object which compiled from the following source:

static int local_static_gint;
int local_gint;
extern unsigned short extern_int;

void extern_foo();
void bottom_foo();

static void static_foo() {
    return;
}

void top_foo() {
    static int static_bar = 0x01;

    static_bar = 0x02;
    return;
}

int main() {
    int local_i = 1;

    local_gint = 0x1234;
    int x = -local_gint;
    extern_int = 0x67;
    local_static_gint = 0xabcd;

    static_foo();
    extern_foo();
    top_foo();

    // void (*fn_ptr)() = &extern_foo;
    // fn_ptr();

    bottom_foo();

    return 0;
}

void bottom_foo() {
    int x = 10;
    return;
}

compile command: rx-elf-gcc -c reloc_tmp.c -o reloc_tmp.o ; and check with rx-elf-readelf and rx-elf-ld

Closing issues

...

@Heersin Heersin marked this pull request as ready for review April 28, 2024 14:27
@Heersin Heersin requested a review from Rot127 April 28, 2024 14:28
@XVilka XVilka merged commit ba780a7 into rizinorg:dev May 1, 2024
43 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants