mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
rk: add and fix PIE support
1) PIE depends on GENERIC_ALLOCATOR 2) fix old version objcopy -j do not support wildcard 3) add rockchip PIE section group
This commit is contained in:
@@ -23,6 +23,7 @@ SECTIONS
|
||||
|
||||
PIE_OVERLAY_START
|
||||
OVERLAY : NOCROSSREFS {
|
||||
PIE_OVERLAY_SECTION(rockchip)
|
||||
}
|
||||
PIE_OVERLAY_SEND
|
||||
|
||||
|
||||
@@ -345,6 +345,7 @@ config HAVE_PIE
|
||||
config PIE
|
||||
bool "Embedded position independant executables"
|
||||
depends on HAVE_PIE
|
||||
select GENERIC_ALLOCATOR
|
||||
help
|
||||
This option adds support for embedding position indepentant (PIE)
|
||||
executables into the kernel. The PIEs can then be copied into
|
||||
|
||||
@@ -62,6 +62,8 @@ $(obj)/pie_stage2.o: $(obj)/pie_stage1.o $(obj)/libpie_stage2.o
|
||||
|
||||
# Drop everything but the pie sections
|
||||
OBJCOPYFLAGS_pie_stage3.o += -j ".pie.*"
|
||||
OBJCOPYFLAGS_pie_stage3.o += -j ".pie.text"
|
||||
OBJCOPYFLAGS_pie_stage3.o += -j ".pie.rockchip.text" -j ".pie.rockchip.data"
|
||||
|
||||
$(obj)/pie_stage3.o: $(obj)/pie_stage2.o
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
Reference in New Issue
Block a user