[PATCH] elf: Assert that objects are relocated before their constructors run

Florian Weimer fweimer@redhat.com
Mon May 18 13:39:21 GMT 2020


* Carlos O'Donell:

> On 9/11/19 5:57 AM, Florian Weimer wrote:
>> If we try to run constructors before relocation, this is always
>> a dynamic linker bug.  An assert is easier to notice than a call
>> via an invalid function pointer (which may not even produce a valid
>> call stack).
>> 
>> 2019-09-11  Florian Weimer  <fweimer@redhat.com>
>> 
>> 	* elf/dl-init.c (call_init): Assert that the object has been
>> 	relocated.
>
> OK for master.
>
> Reviewed-by: Carlos O'Donell <carlos@redhat.com>

Thanks.  I've finally pushed this.

Thanks,
Florian



More information about the Libc-alpha mailing list