This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] _dl_start: Remove internal_function attribute
- From: Florian Weimer <fweimer at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 14 Aug 2017 14:45:12 +0200
- Subject: Re: [PATCH] _dl_start: Remove internal_function attribute
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=fweimer at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4C4A17605E
- References: <CAMe9rOqXopdtgaMGhp0uRa8WaWOfXCpY8rXP3+A7D_CNq32WYA@mail.gmail.com>
On 08/14/2017 02:30 PM, H.J. Lu wrote:
>> diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
>> index 9ee9d02c36..924de953b7 100644
>> --- a/sysdeps/i386/dl-machine.h
>> +++ b/sysdeps/i386/dl-machine.h
>> @@ -150,9 +150,11 @@ extern ElfW(Addr) _dl_profile_fixup (struct link_map *l,
>> .globl _start\n\
>> .globl _dl_start_user\n\
>> _start:\n\
>> - # Note that _dl_start gets the parameter in %eax.\n\
>> movl %esp, %eax\n\
>> + subl $12, %esp\n\
>> + pushl %eax\n\
>> call _dl_start\n\
>> + addl $16, %esp\n\
>> _dl_start_user:\n\
>> # Save the user entry point address in %edi.\n\
>> movl %eax, %edi\n\
>
> CFI adjustments are missing.
%ebp is zero at process startup, so based on an existing comment, we are
not supposed to unwind to _start:
# Clear %ebp, so that even constructors have terminated backchain.\n\
I expect that the unwinder will note the absence of unwind data for
_start, look at %ebp, notice that is zero, and give up. Isn't that what
happens?
Like I said, this is a pre-existing condition.
Thanks,
Florian