This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[MIPS] ld.so accepting both REL and RELA relocations


We're doing some work that needs run-time relocation of a currently loaded dso. 
This requires RELA since the original addend of a REL will be lost. 
We need this functionality for 32-bit O32, as well as N32/N64.

I have done some preliminary work in both the linker to produce 
RELA and then ld.so to receive RELA relocations. I have 3 questions:

1) Can ld.so be easily set to accept both REL and RELA? If so, is there
    an existing example?

2) Is there specific changes needed to get static executables to accept RELA 
    relocations? In particular, I have R_MIPS_IRELATIVE relocations that are 
    used to update a table of IFUNC functions. I understand that this is not
    ld.so exactly, but I thought it used the same code such as dl_machine.h.
    I had it working for REL and with RELA it just seems to ignore the relocations.

3) Why doesn't the dynamic linker just handle both RELA and REL by their dynamic
    section tags? Why do we have to rely on defines in the dynamic linker code?

Thanks,

Jack

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]