bcm2-utils icon indicating copy to clipboard operation
bcm2-utils copied to clipboard

MIPS ABI

Open stdw opened this issue 4 years ago • 1 comments

In rwcode2.c, I saw the comment about using a 5th argument. From what I've seen on the BCM3383 at least it seems to use EABI which uses t0-t3 for extra args which is how everything in the bootloader and ecos are on my device. I tried n32 also but was getting bad instructions. I've had the best results with -march=mips32 and -mabi=eabi.

I have a repo on my profile with with some of my RE stuff if you're interested

stdw avatar Sep 10 '20 17:09 stdw

Hi! You're right, I'm getting the desired results with -mips32 -mno-abicalls -mabi=eabi -msoft-float!

I have a repo on my profile with with some of my RE stuff if you're interested.

Thanks, I've already considered using a linker script to make rwcode2 a bit less awkward to use. Function addresses can't be hard-coded however, as the code needs to be portable across all firmware versions.

jclehner avatar Sep 12 '20 19:09 jclehner