This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: COPY relocs and _r_debug?
- From: Roland McGrath <roland at redhat dot com>
- To: "Carlos O'Donell" <carlos at baldric dot uwo dot ca>
- Cc: libc-alpha <libc-alpha at sources dot redhat dot com>
- Date: Tue, 23 Dec 2003 19:00:00 -0800
- Subject: Re: COPY relocs and _r_debug?
> 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.