This patch provides a fix for wrong plt entry size generated for binaries built with gcc and linked with ld for arm linux targets.
Many tests fail on arm-linux targets for this very issues. Luckily on Android arm32 targets we get a zero size for which there is already a fix available in the code.
Effect of this patch appears when code jumps into plt code and tries to calculate frame for current PC. A wrong calculation of plt entry addresses ranges results in failure to calculate frame hence stepping failures when dealing with any library functions using procedure linkage table.
LD produces 12 byte plt entries for arm and can also produce 16 byte entries but by no means plt entry can be 4 bytes which appears while we decode plt header.
No other architecture in my knowledge uses a PLT slot of less than or equal to 4bytes. I could be wrong but in my knowledge a PLT slot is at least 2 instructions on a 32bit machine s which is 8 bytes and a lot higher for 64 bit machines so I have made the code change to handle all casses below or equal 4 bytes with manual calculation.
This fixes issues on arm targets.
LGTM? or comments?