[RFC PATCH 3/3] add r_debug multiple namespaces support
Carlos O'Donell
carlos@redhat.com
Fri Jun 26 21:44:43 GMT 2020
On 6/26/20 5:24 PM, Florian Weimer wrote:
> * Carlos O'Donell:
>
>> On 6/26/20 5:05 PM, Florian Weimer via Libc-alpha wrote:
>>> * Daniel Walker via Libc-alpha:
>>>
>>>> diff --git a/elf/link.h b/elf/link.h
>>>> index 0048ad5d4d..5a42511636 100644
>>>> --- a/elf/link.h
>>>> +++ b/elf/link.h
>>>> @@ -61,6 +61,10 @@ struct r_debug
>>>> } r_state;
>>>>
>>>> ElfW(Addr) r_ldbase; /* Base address the linker is loaded at. */
>>>> +
>>>> + /* Link to next r_debug struct. Each r_debug struct represents a
>>>> + different namespace. The first r_debug struct is the default. */
>>>> + struct r_debug *next;
>>>> };
>>>>
>>>> /* This is the instance of that structure used by the dynamic linker. */
>>>
>>> How has this patch been tested? I expect that it will cause an abilist
>>> mismatch for the _r_debug symbol in the dynamic linker.
>>>
>>> If we go this route to add this capability, I think we have to add a new
>>> symbol version for the _r_debug symbol, and keep the old one at the
>>> previous size.
>>>
>>> How is your compatibility experience with the size and version change?
>>> How many tools need updating before they work again?
>>>
>>> A different approach would add another symbol (parallel to _r_debug) to
>>> store this data. This would avoid the need for any immediate tool
>>> updates.
>>
>> I mention this in my response to the cover letter in this series.
>
> Your explanation there was truncated.
Truncated in which way?
>> This patch is probably unacceptable as-is because of application
>> expectations.
>
> But perhaps Cisco's experience shows that our worries are unfounded?
That would be great!
I would want to see gdb changed to r_version > 0, and document that
the increasing r_version means changes that only expand the structure
and add new information while keeping old information backwards
compatible.
I'm not sure it would work to version _r_debug, since the debugger
is using DT_DEBUG and we only get to put one value in that
.dynamic entry.
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list