Skip to content

Relocation R_X86_64_32S out of range #70992

Closed
@ghost

Description

I tried to link some code to large address using custom linker script but it says 'relocation R_X86_64_32S out of range'

linker script:

SECTIONS
{
  . = 0xffff800000000000;
  .text : { *(.text) }
  .data : { *(.data) }
  .bss : { *(.bss) }
}

command: rustc main.rs -C link-arg='--script=link.ld' -C code-model=large

Meta

rustc --version --verbose:

rustc 1.44.0-nightly (1edd389cc 2020-03-23)
Backtrace

<backtrace>

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions