|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 08/17] livepatch/tests: Make sure all .livepatch.funcs sections are read-only
Instead of being writable (.data). This mimics the behavior of what
livepatch-build-tools do.
Other approaches such as 'struct const livepatch_funcs' still result
in the WA section attributes.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
xen/test/livepatch/Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile
index 9e73861732..6e5b9a3a75 100644
--- a/xen/test/livepatch/Makefile
+++ b/xen/test/livepatch/Makefile
@@ -54,6 +54,7 @@ xen_hello_world.o: config.h livepatch_depends.h
$(LIVEPATCH): xen_hello_world_func.o xen_hello_world.o
$(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH) $^
$(OBJCOPY) --strip-debug --strip-symbol=$(NOTE_SYMBOL) $@
+ $(OBJCOPY) --set-section-flags .livepatch.funcs=alloc,readonly $@
#
# This target is only accessible if CONFIG_LIVEPATCH is defined, which
@@ -90,6 +91,7 @@ xen_bye_world.o: config.h hello_world_livepatch_depends.h
$(LIVEPATCH_BYE): xen_bye_world_func.o xen_bye_world.o
$(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_BYE) $^
$(OBJCOPY) --strip-debug --strip-symbol=$(NOTE_SYMBOL) $@
+ $(OBJCOPY) --set-section-flags .livepatch.funcs=alloc,readonly $@
xen_replace_world.o: config.h livepatch_depends.h
@@ -97,6 +99,7 @@ xen_replace_world.o: config.h livepatch_depends.h
$(LIVEPATCH_REPLACE): xen_replace_world_func.o xen_replace_world.o
$(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_REPLACE) $^
$(OBJCOPY) --strip-debug --strip-symbol=$(NOTE_SYMBOL) $@
+ $(OBJCOPY) --set-section-flags .livepatch.funcs=alloc,readonly $@
xen_nop.o: config.h livepatch_depends.h
@@ -104,6 +107,7 @@ xen_nop.o: config.h livepatch_depends.h
$(LIVEPATCH_NOP): xen_nop.o
$(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVEPATCH_NOP) $^
$(OBJCOPY) --strip-debug --strip-symbol=$(NOTE_SYMBOL) $@
+ $(OBJCOPY) --set-section-flags .livepatch.funcs=alloc,readonly $@
.PHONY: livepatch
livepatch: $(LIVEPATCH) $(LIVEPATCH_BYE) $(LIVEPATCH_REPLACE) $(LIVEPATCH_NOP)
--
2.13.3
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |