linker: Fix ARM_R_COPY relocations
Per http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044d/IHI0044D_aaelf.pdf Section 4.7.1.10, ARM_R_COPY relocations are only suppose to reference shared libraries, not the executable itself. When resolving an R_ARM_COPY symbol, ensure we don't look in our own symbol. This partially addresses http://code.google.com/p/android/issues/detail?id=28598 . After this patch, the printfs generated by the test program are: global = 0x42 (0x401c7000) global = 0x42 (0x11000) before, the output was: global = 0x42 (0x40071000) global = 0x0 (0x11000) I'm still not very happy with this patch, but I think it's an improvement over where we were at before. This change was modeled after https://android-review.googlesource.com/38871 Change-Id: Id7ad921e58395e76a36875bcc742ec5eeba53f08
Loading
Please sign in to comment