[PATCH v3] RISC-V: Enable dead code elimination

Palmer Dabbelt palmer at rivosinc.com
Tue Jun 20 13:41:26 PDT 2023


On Tue, 20 Jun 2023 13:26:53 PDT (-0700), ndesaulniers at google.com wrote:
> On Tue, Jun 20, 2023 at 4:17 PM Palmer Dabbelt <palmer at rivosinc.com> wrote:
>>
>> On Tue, 20 Jun 2023 13:13:06 PDT (-0700), ndesaulniers at google.com wrote:
>> > On Wed, May 17, 2023 at 04:29:36PM +0800, Zhangjin Wu wrote:
>> >> Select CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION for RISC-V, allowing
>> >> the user to enable dead code elimination. In order for this to work,
>> >> ensure that we keep the alternative table by annotating them with KEEP.
>> >>
>> >
>> > Just cross referencing the report from Palmer against v2; I see orphan
>> > section warnings from the linker related to the EFI stub when building
>> > allmodconfig with this patch applied.
>> >
>> > v2: thread for reference.
>> > https://lore.kernel.org/linux-riscv/CAKwvOdmsgMN5oQpDLh12D0X-CfQDtHC-EtxHcBnADkhnyitMKQ@mail.gmail.com/
>>
>> Sorry for replying to the v2, I'm marking that as superseeded in
>> patchwork.  IIUC it is a real issue on your end too?  I'm also not 100%
>> sure about the hang, I just let LLD cook for about 10 minutes before I
>> noticed it was still running and posted.
>
> Yes; if this is merged, our CI builds of ARCH=riscv allmodconfig will go red.
>
> I assume a linker script somewhere needs to be updated, but I haven't
> found if/where the efi stub's is.
>
> drivers/firmware/efi/libstub/zboot.lds perhaps?
>
> On Tue, Jun 20, 2023 at 4:22 PM Conor Dooley <conor at kernel.org> wrote:
>>
>> Repeating myself for the sake of the archives or w/e, two different
>> submitters with differing version numbers. The v2 from Jisheng is more
>> recent than the v3 here from Zhangjin, they agreed in this mail thread
>> to merge their work.

Thanks, so we're going to jump over there.

>
> -- 
> Thanks,
> ~Nick Desaulniers



More information about the linux-riscv mailing list