[PATCH 6/6] RISC-V: place .sdata / .srodata / .riscv.attributes
Jan Beulich <[email protected]>
| Newsgroups | gmane.comp.emulators.xen.devel |
|---|---|
| Message-ID | <[email protected]> |
Of the short-data sections, only .sbss is presently mentioned in the linker script. Place them next to, but ahead of their "normal" data sections. .riscv.attributes can go towards the tail of the image, next to (ahead of) debug info. Signed-off-by: Jan Beulich <[email protected]> --- Seeing where .sbss lives, does positioning really not matter at all? I would have expected that short-data sections want to live close together, and specifically close to .text / .init.text (seeing that such data is accessed using AUIPC). I'm puzzled that the psABI doesn't even mention them, hence leaving it open how exactly they are to be used. What remains to eliminate orphan section warnings is the placement of .note.GNU-stack (which perhaps wants dealing with on all of Arm, PPC, and RISC-V together, ideally unifying with x86) and (odd at the first glance, but dealt with on x86 as well, i.e. may again want unifying) that of a number of .rela.* sections. --- a/xen/arch/riscv/xen.lds.S +++ b/xen/arch/riscv/xen.lds.S @@ -44,6 +44,8 @@ SECTIONS BUGFRAMES + *(.srodata) + *(.srodata.*) *(.rodata) *(.rodata.*) VPCI_ARRAY @@ -92,6 +94,7 @@ SECTIONS SCHEDULER_ARRAY HYPFS_PARAM + *(.sdata .sdata.*) *(.data .data.*) CONSTRUCTORS } :text @@ -162,6 +165,8 @@ SECTIONS /* Section for the device tree blob (if any). */ .dtb : { *(.dtb) } :text + .riscv.attributes : { *(.riscv.attributes) } :text + DWARF2_DEBUG_SECTIONS DISCARD_SECTIONS