um: Don't discard .text.exit section
authorAndrey Ryabinin <aryabinin@virtuozzo.com>
Wed, 17 Aug 2016 15:10:11 +0000 (18:10 +0300)
committerRichard Weinberger <richard@nod.at>
Tue, 23 Aug 2016 21:16:16 +0000 (23:16 +0200)
commitdad2232844073295c64e9cc2d734a0ade043e0f6
treea352eaef97e942f054c9f24828a49794ef5438c8
parent7a1dcf6adaa7cc4b8cd93a3883267497a77b1051
um: Don't discard .text.exit section

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>
Acked-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/include/asm/common.lds.S