Skip to content

lld COFF X64: out of range relocations are truncated without reporting errors #107124

Open
@v01dXYZ

Description

@v01dXYZ

In this related issue (#106319), some object code has been generated with code-model=small relocation-model=static and uses 32-bit absolute relocations. As the 64-bit base address is greater than 1 << 32, ldd produces wrong relocated addresses.

When looking at the code, it seems we narrow/truncate then compute instead of doing the way round.
For comparison, ELF uses checkUInt/checkInt/checkIntUInt after 64-bit address computations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions