Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/rust/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
rust lld重新定位R_X86_64_32超出范围_Rust_Linker_Static Linking - Fatal编程技术网

rust lld重新定位R_X86_64_32超出范围

rust lld重新定位R_X86_64_32超出范围,rust,linker,static-linking,Rust,Linker,Static Linking,我试图将一些代码链接到0xFFFF80000000000,但出现错误“重新定位R_X86_64_32S超出范围”。我正在链接64位代码,并使用'-C relocation model=large-C code model=static'。我还使用自定义链接器脚本。请告诉我如何修复此错误 链接器脚本: SECTIONS { . = 0xffff800000000000; .text : { *(.text) } .data : { *(.data) } .rodat

我试图将一些代码链接到0xFFFF80000000000,但出现错误“重新定位R_X86_64_32S超出范围”。我正在链接64位代码,并使用'-C relocation model=large-C code model=static'。我还使用自定义链接器脚本。请告诉我如何修复此错误

链接器脚本:

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

    /DISCARD/ : { *(.eh_frame) *(.comment) }
}