From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: Jeff Dike <jdike@addtoit.com>,
Richard Weinberger <richard@nod.at>,
user-mode-linux-devel
<user-mode-linux-devel@lists.sourceforge.net>,
LKML <linux-kernel@vger.kernel.org>,
Stefan Traby <stefan@hello-penguin.com>,
stable <stable@vger.kernel.org>
Subject: Re: [PATCH] UML: don't discard .text.exit section
Date: Thu, 18 Aug 2016 13:08:39 +0300 [thread overview]
Message-ID: <995ff767-9220-f9c8-c052-2b717cc7e91d@virtuozzo.com> (raw)
In-Reply-To: <CACT4Y+bEnGV0X1MeGvdZM1VWqr25f61GyVqRKvQO46UGpE0VhA@mail.gmail.com>
On 08/17/2016 08:11 PM, Dmitry Vyukov wrote:
> On Wed, Aug 17, 2016 at 8:10 AM, Andrey Ryabinin
> <aryabinin@virtuozzo.com> wrote:
>> Commit e41f501d3912 ("vmlinux.lds: account for destructor sections")
>> added '.text.exit' to EXIT_TEXT which is discarded at link time by default.
>> This breaks compilation of UML:
>> `.text.exit' referenced in section `.fini_array' of
>> /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libc.a(sdlerror.o):
>> defined in discarded section `.text.exit' of
>> /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libc.a(sdlerror.o)
>>
>> Apparently UML doesn't want to discard exit text, so let's place all EXIT_TEXT
>> sections in .exit.text.
>>
>> Fixes: e41f501d3912 ("vmlinux.lds: account for destructor sections")
>> Reported-by: Stefan Traby <stefan@hello-penguin.com>
>> Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
>> Cc: <stable@vger.kernel.org> # 4.0+
>> ---
>> arch/um/include/asm/common.lds.S | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/um/include/asm/common.lds.S b/arch/um/include/asm/common.lds.S
>> index 1dd5bd8..1330553 100644
>> --- a/arch/um/include/asm/common.lds.S
>> +++ b/arch/um/include/asm/common.lds.S
>> @@ -81,7 +81,7 @@
>> .altinstr_replacement : { *(.altinstr_replacement) }
>> /* .exit.text is discard at runtime, not link time, to deal with references
>> from .altinstructions and .eh_frame */
>> - .exit.text : { *(.exit.text) }
>> + .exit.text : { EXIT_TEXT }
>> .exit.data : { *(.exit.data) }
>>
>> .preinit_array : {
>> --
>> 2.7.3
>>
>
>
> Sorry for delays, I am travelling.
> Do we need ".fini_array" section? It's also destructors that we don't
> run. Or does UML use them? Does discarding ".fini_array" help?
>
libc has desctructors and use them for whatever purpose it needs.
next prev parent reply other threads:[~2016-08-18 12:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAFLxGvzB=WGNEdNJVvPpQLpwCqT6oNcvEQnyT2xk0Jv2L3FBaA@mail.gmail.com>
2016-08-17 15:10 ` Andrey Ryabinin
2016-08-17 17:11 ` Dmitry Vyukov
2016-08-18 10:08 ` Andrey Ryabinin [this message]
2016-08-19 0:14 ` Dmitry Vyukov
2016-08-19 10:48 ` Andrey Ryabinin
2016-08-19 11:16 ` Richard Weinberger
2016-08-19 13:06 ` Andrey Ryabinin
2016-08-19 15:24 ` Dmitry Vyukov
2016-08-22 20:10 ` Richard Weinberger
2016-08-23 9:59 ` Andrey Ryabinin
2016-08-23 21:40 ` Richard Weinberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=995ff767-9220-f9c8-c052-2b717cc7e91d@virtuozzo.com \
--to=aryabinin@virtuozzo.com \
--cc=dvyukov@google.com \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=richard@nod.at \
--cc=stable@vger.kernel.org \
--cc=stefan@hello-penguin.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®