Re: [PATCH v2 7/7] RISC-V: place .sdata / .srodata / .riscv.attributes

Andrew Cooper <[email protected]>
Newsgroups gmane.comp.emulators.xen.devel
Message-ID <[email protected]>
On 27/08/2026 4:40 pm, Oleksii Kurochko wrote:
>
> Is dropping orphan-handling-y := from arch/riscv/Makefile the intended
> end of this series? As if I understand correctly with such defintion
> we will miss warning so everything of that will be missed:
>
> cd xen
> riscv64-linux-gnu-ld -T arch/riscv/xen.lds prelink.o
> --orphan-handling=warn -o /tmp/t.elf 2>&1 \
>   | grep 'orphan section'
> /usr/bin/riscv64-linux-gnu-ld: warning: orphan section
> `.note.GNU-stack' from `prelink.o' being placed in section
> `.note.GNU-stack'
> /usr/bin/riscv64-linux-gnu-ld: warning: orphan section `.rela.text'
> from `prelink.o' being placed in section `.rela.dyn'
> /usr/bin/riscv64-linux-gnu-ld: warning: orphan section
> `.rela.init.text' from `prelink.o' being placed in section `.rela.dyn'
> /usr/bin/riscv64-linux-gnu-ld: warning: orphan section
> `.rela.data.read_mostly' from `prelink.o' being placed in section
> `.rela.dyn'
> /usr/bin/riscv64-linux-gnu-ld: warning: orphan section
> `.rela.init.data' from `prelink.o' being placed in section `.rela.dyn'
> /usr/bin/riscv64-linux-gnu-ld: warning: orphan section
> `.rela.text.header' from `prelink.o' being placed in section `.rela.dyn' 
>

Orphaned sections are a huge source of bugs.  Right now, only x86 has
any kind of orphan warning, so the `orphan-handling-y :=` is maintaining
the existing behaviour.

Longterm we do want to delete that override, but IMO it should be
follow-on work, rather than being part of this series.

~Andrew
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.