mirror of https://gitee.com/openkylin/linux.git
x86/vmlinux: Drop unneeded linker script discard of .eh_frame
Now that .eh_frame sections for the files in setup.elf and realmode.elf are not generated anymore, the linker scripts don't need the special output section name /DISCARD/ any more. Remove the one in the main kernel linker script as well, since there are no .eh_frame sections already, and fix up a comment referencing .eh_frame. Update the comment in asm/dwarf2.h referring to .eh_frame so it continues to make sense, as well as being more specific. [ bp: Touch up commit message. ] Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Kees Cook <keescook@chromium.org> Tested-by: Nathan Chancellor <natechancellor@gmail.com> Link: https://lkml.kernel.org/r/20200224232129.597160-3-nivedita@alum.mit.edu
This commit is contained in:
parent
003602ad55
commit
6f8f0dc980
|
@ -73,9 +73,4 @@ SECTIONS
|
||||||
#endif
|
#endif
|
||||||
. = ALIGN(PAGE_SIZE); /* keep ZO size page aligned */
|
. = ALIGN(PAGE_SIZE); /* keep ZO size page aligned */
|
||||||
_end = .;
|
_end = .;
|
||||||
|
|
||||||
/* Discard .eh_frame to save some space */
|
|
||||||
/DISCARD/ : {
|
|
||||||
*(.eh_frame)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,6 @@ SECTIONS
|
||||||
_end = .;
|
_end = .;
|
||||||
|
|
||||||
/DISCARD/ : {
|
/DISCARD/ : {
|
||||||
*(.eh_frame)
|
|
||||||
*(.note*)
|
*(.note*)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,8 @@
|
||||||
* Emit CFI data in .debug_frame sections, not .eh_frame sections.
|
* Emit CFI data in .debug_frame sections, not .eh_frame sections.
|
||||||
* The latter we currently just discard since we don't do DWARF
|
* The latter we currently just discard since we don't do DWARF
|
||||||
* unwinding at runtime. So only the offline DWARF information is
|
* unwinding at runtime. So only the offline DWARF information is
|
||||||
* useful to anyone. Note we should not use this directive if
|
* useful to anyone. Note we should not use this directive if we
|
||||||
* vmlinux.lds.S gets changed so it doesn't discard .eh_frame.
|
* ever decide to enable DWARF unwinding at runtime.
|
||||||
*/
|
*/
|
||||||
.cfi_sections .debug_frame
|
.cfi_sections .debug_frame
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -313,8 +313,8 @@ SECTIONS
|
||||||
|
|
||||||
. = ALIGN(8);
|
. = ALIGN(8);
|
||||||
/*
|
/*
|
||||||
* .exit.text is discard at runtime, not link time, to deal with
|
* .exit.text is discarded at runtime, not link time, to deal with
|
||||||
* references from .altinstructions and .eh_frame
|
* references from .altinstructions
|
||||||
*/
|
*/
|
||||||
.exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) {
|
.exit.text : AT(ADDR(.exit.text) - LOAD_OFFSET) {
|
||||||
EXIT_TEXT
|
EXIT_TEXT
|
||||||
|
@ -412,9 +412,6 @@ SECTIONS
|
||||||
DWARF_DEBUG
|
DWARF_DEBUG
|
||||||
|
|
||||||
DISCARDS
|
DISCARDS
|
||||||
/DISCARD/ : {
|
|
||||||
*(.eh_frame)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,6 @@ SECTIONS
|
||||||
/DISCARD/ : {
|
/DISCARD/ : {
|
||||||
*(.note*)
|
*(.note*)
|
||||||
*(.debug*)
|
*(.debug*)
|
||||||
*(.eh_frame*)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "pasyms.h"
|
#include "pasyms.h"
|
||||||
|
|
Loading…
Reference in New Issue