[PATCH v3 0/3] Fully support standalone Clang/LLVM toolchains
Xiang W
wxjstz at 126.com
Sat Jul 10 06:18:33 PDT 2021
在 2021-07-09星期五的 15:25 +0100,Jessica Clarke写道:
> On 9 Jul 2021, at 15:23, Xiang W <wxjstz at 126.com> wrote:
> >
> > 在 2021-07-09星期五的 14:49 +0100,Jessica Clarke写道:
> > > On 9 Jul 2021, at 14:46, Xiang W <wxjstz at 126.com> wrote:
> > > >
> > > > 在 2021-07-09星期五的 05:12 +0100,Jessica Clarke写道:
> > > > I tested these patches. Some bugs reported
> > > >
> > > > ld.lld: error: can't create dynamic relocation R_RISCV_32
> > > > against
> > > > symbol: _fw_start in readonly segment; recompile object files
> > > > with
> > > > -
> > > > fPIC or pass '-Wl,-z,notext' to allow text relocations in the
> > > > output
> > > > > > > defined in
> > > > /home/merle/workspaces/opensbi/build/platform/generic/firmware/
> > > > fw_d
> > > > ynam
> > > > ic.elf.ld:9
> > > > > > > referenced by fw_base.S:502
> > > > (/home/merle/workspaces/opensbi/firmware/fw_base.S:502)
> > > > > > >
> > > > /home/merle/workspaces/opensbi/build/platform/generic/firmware/
> > > > fw_d
> > > > ynam
> > > > ic.o:(.entry+0x3BC)
> > >
> > > This was reported by Bin. Don’t use a Linux triple for something
> > > that’s
> > > neither the Linux kernel nor a Linux userspace
> > > executable/library.
> > >
> > > Jess
> >
> > Linux triple?
>
> That error looks like you built with CROSS_COMPILE=riscv64-linux- or
> similar. What exactly did you run?
>
> Jess
I ran the following command
CROSS_COMPILE=riscv64-linux-gnu- make PLATFORM_RISCV_XLEN=32
PLATFORM=generic LLVM=1
The problem is solved after adding .data in base.S
Regards,
Xiang W
More information about the opensbi
mailing list