[PATCH] ARM: Fix R_ARM_IRELATIVE RELA relocations

Julian Brown julian@codesourcery.com
Wed Apr 30 15:25:00 GMT 2014


Hi,

This patch fixes what I believe to be a bug in the handling of
R_ARM_IRELATIVE RELA relocations. At present, these are handled the
same as REL relocations: i.e. the addend is loaded from the relocation
address. Most of the time this isn't a problem because RELA relocations
aren't used on ARM (GNU/Linux at least) anyway, but it causes problems
with prelink, which uses RELA on all targets for its conflict table.
(Support for ifunc prelinking requires a prelink patch, not yet posted.)

Anyway, this patch works, though I'm not 100% sure if it is correct: I
notice that this code path received attention last year:

https://sourceware.org/ml/libc-ports/2013-07/msg00000.html

I'm not sure under what circumstances that patch would have had an
effect, nor if my patch conflicts with that case.

No regressions using Mentor's usual glibc cross-testing infrastructure.
OK to apply?

(Strangely, this appears to be my first glibc patch, so I'm not
entirely certain if I have write access!)

Thanks,

Julian

ChangeLog

    * sysdeps/arm/dl-machine.h (elf_machine_rela): Fix R_ARM_IRELATIVE
    handling.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: glibc-fsf-irelative-rela-1.diff
Type: text/x-patch
Size: 464 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140430/02705665/attachment.bin>


More information about the Libc-alpha mailing list