Skip to content

coff lld relocation out of range error from tailMergeARM64 chunk to __delayLoadHelper2 #161812

@zmodem

Description

@zmodem

I don't have a great reproducer to share yet, but we're hitting lld-link: error: relocation out of range when building Chromium for Win/ARM64.

The relocation in question is from a TailMergeChunkARM64 to the __delayLoadHelper2 symbol:

applyArm64Branch26(buf + 52, helper->getRVA() - rva - 52);

I suppose __delayLoadHelper2 may have ended up closer to the start of the text section, which is now large engouh that now we can't reach it from .didat directly.

@rnk and @mstorsjo who looked at this in https://reviews.llvm.org/D64288

Do you have ideas on how to best fix this?

Would it be reasonable to change the call sequence, doing something like: zmodem@ed21d8e

Or is there a handy of way of making lld emit a thunk/branch island for the call?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions