forked from yanncam/UnSHc
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
42 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
741db65
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
Excellent work ! Thank you for your evolution on the original UnSHc script to be compliant with MIPS architecture :) !
Can I mention your contribution with a link to this repository on the UnSHc base project ?
Sincerely,
Ycam
741db65
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yanncam Sure! Thanks for your excellent work on the original version. This version will not be possible without your previous work! 😄
741db65
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added a note on the README.md of UnSHc original repos to point to your MIPS version:
Thank you again !
Next step : ARM arch ^^ !
741db65
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yanncam Great I appreciate that!
And that's good plan ;- )
741db65
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, @fffonion and @yanncam !
What kind of MIPS ABI you created your patch for? As far as I know traditional MIPS ABI(aka GOT/PLT) assumes you are using $t9 register to store the subroutine addresses and then jal.* $t9. Its fare for both PIC and non-PIC code.
Here is the example of arc4 call:
And what you call DATASEGBASE , I believe, is actually not a .data segment address(that can be found from objdump/readelf), but a $gp value that you can theoretically calculate. At least it is true in my case.
741db65
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
741db65
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @m0sia,
I've attached the binary below and it matches your description about $t9 and $gp register. Per my understanding, $gp is used to store the address of global variables. So that should also lay in the .data seg?
sample.zip