提交 dad22328 编写于 作者: A Andrey Ryabinin 提交者: Richard Weinberger

um: Don't discard .text.exit section

Commit e41f501d ("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: e41f501d ("vmlinux.lds: account for destructor sections")
Reported-by: NStefan Traby <stefan@hello-penguin.com>
Signed-off-by: NAndrey Ryabinin <aryabinin@virtuozzo.com>
Cc: <stable@vger.kernel.org>
Acked-by: NDmitry Vyukov <dvyukov@google.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 7a1dcf6a
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
.altinstr_replacement : { *(.altinstr_replacement) } .altinstr_replacement : { *(.altinstr_replacement) }
/* .exit.text is discard at runtime, not link time, to deal with references /* .exit.text is discard at runtime, not link time, to deal with references
from .altinstructions and .eh_frame */ from .altinstructions and .eh_frame */
.exit.text : { *(.exit.text) } .exit.text : { EXIT_TEXT }
.exit.data : { *(.exit.data) } .exit.data : { *(.exit.data) }
.preinit_array : { .preinit_array : {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册