COPY relocs and _r_debug?

Roland McGrath roland@redhat.com
Wed Dec 24 03:00:00 GMT 2003


> I noticed that around rtld.c:1652 we run through _dl_relocate_object,
> and this eventually calls elf_machine_rela and relocates the COPY reloc
> *before* _dl_initialize_debug has been run atleast once to give the
> first setup values.
> 
> As such the _r_debug that the application sees is just zeros. What is
> the proper order here?

The _r_debug references in ld.so (dl-debug.c), which is to say, ld.do's GOT
entry for _r_debug, should be getting relocated to point to the application
copy.



More information about the Libc-alpha mailing list