标签:程序 truncate function ror mit 今天 symbol return exit
从来没有用过fortran, 今天有师弟让我帮忙跑一个fortran的程序, 我一编译就报如下错误
/tmp/ccy4yDLX.o: In function `output_‘:
Hjdk.for:(.text+0xc3): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0xfa): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0x131): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0x168): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0x314): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0x34b): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0x382): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0x3b9): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
/tmp/ccy4yDLX.o: In function `rk_‘:
Hjdk.for:(.text+0x653): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0x663): relocation truncated to fit: R_X86_64_32S against symbol `sol_‘ defined in COMMON section in /tmp/ccy4yDLX.o
Hjdk.for:(.text+0x809): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
解决方案是在编译时加上参数设置 -mcmodel=medium 就可以
gfortran a.for -mcmodel=medium
标签:程序 truncate function ror mit 今天 symbol return exit
原文地址:http://www.cnblogs.com/catinlbb/p/6920770.html