@@ -55,16 +55,9 @@ SECTIONS
. = ALIGN(PAGE_SIZE);
.rodata : {
_srodata = .; /* Read-only data */
- /* Bug frames table */
- __start_bug_frames = .;
- *(.bug_frames.0)
- __stop_bug_frames_0 = .;
- *(.bug_frames.1)
- __stop_bug_frames_1 = .;
- *(.bug_frames.2)
- __stop_bug_frames_2 = .;
- *(.bug_frames.3)
- __stop_bug_frames_3 = .;
+
+ BUGFRAMES
+
*(.rodata)
*(.rodata.*)
*(.data.rel.ro)
@@ -42,16 +42,9 @@ SECTIONS
. = ALIGN(PAGE_SIZE);
.rodata : {
_srodata = .; /* Read-only data */
- /* Bug frames table */
- __start_bug_frames = .;
- *(.bug_frames.0)
- __stop_bug_frames_0 = .;
- *(.bug_frames.1)
- __stop_bug_frames_1 = .;
- *(.bug_frames.2)
- __stop_bug_frames_2 = .;
- *(.bug_frames.3)
- __stop_bug_frames_3 = .;
+
+ BUGFRAMES
+
*(.rodata)
*(.rodata.*)
*(.data.rel.ro)
@@ -42,16 +42,9 @@ SECTIONS
. = ALIGN(PAGE_SIZE);
.rodata : {
_srodata = .; /* Read-only data */
- /* Bug frames table */
- __start_bug_frames = .;
- *(.bug_frames.0)
- __stop_bug_frames_0 = .;
- *(.bug_frames.1)
- __stop_bug_frames_1 = .;
- *(.bug_frames.2)
- __stop_bug_frames_2 = .;
- *(.bug_frames.3)
- __stop_bug_frames_3 = .;
+
+ BUGFRAMES
+
*(.rodata)
*(.rodata.*)
*(.data.rel.ro)
@@ -131,16 +131,7 @@ SECTIONS
. = ALIGN(PAGE_SIZE);
__ro_after_init_end = .;
- /* Bug frames table */
- __start_bug_frames = .;
- *(.bug_frames.0)
- __stop_bug_frames_0 = .;
- *(.bug_frames.1)
- __stop_bug_frames_1 = .;
- *(.bug_frames.2)
- __stop_bug_frames_2 = .;
- *(.bug_frames.3)
- __stop_bug_frames_3 = .;
+ BUGFRAMES
*(.rodata)
*(.rodata.*)
@@ -104,6 +104,17 @@
/* List of constructs other than *_SECTIONS in alphabetical order. */
+#define BUGFRAMES \
+ __start_bug_frames = .; \
+ *(.bug_frames.0) \
+ __stop_bug_frames_0 = .; \
+ *(.bug_frames.1) \
+ __stop_bug_frames_1 = .; \
+ *(.bug_frames.2) \
+ __stop_bug_frames_2 = .; \
+ *(.bug_frames.3) \
+ __stop_bug_frames_3 = .;
+
#ifdef CONFIG_HYPFS
#define HYPFS_PARAM \
. = ALIGN(POINTER_ALIGN); \
Bugframe linkage is identical in all architectures. This is not surprising given that it is (now) only consumed by common/virtual_region.c Introduce a common BUGFRAMES define in xen.lds.h ahead of rearranging their structure. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> --- CC: Jan Beulich <JBeulich@suse.com> CC: Roger Pau Monné <roger.pau@citrix.com> CC: Wei Liu <wl@xen.org> CC: Stefano Stabellini <sstabellini@kernel.org> CC: Julien Grall <julien@xen.org> CC: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com> CC: Bertrand Marquis <bertrand.marquis@arm.com> CC: Michal Orzel <michal.orzel@amd.com> CC: Oleksii Kurochko <oleksii.kurochko@gmail.com> CC: Shawn Anastasio <sanastasio@raptorengineering.com> CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> CC: Ross Lagerwall <ross.lagerwall@citrix.com> --- xen/arch/arm/xen.lds.S | 13 +++---------- xen/arch/ppc/xen.lds.S | 13 +++---------- xen/arch/riscv/xen.lds.S | 13 +++---------- xen/arch/x86/xen.lds.S | 11 +---------- xen/include/xen/xen.lds.h | 11 +++++++++++ 5 files changed, 21 insertions(+), 40 deletions(-)