我想在我的彙編文件指定一個512×32位陣列,這看起來如下:指定數組中彙編
#define FUNCTION_01 test
#define LABEL_01(name) .L ## test ## _ ## name
.section ".data"
my_array:
.word 0x10101010
.word 0x20101010
.word 0x30101010
.word 0x40101010
...
.section ".text"
.align 4
.global FUNCTION_01
.type FUNCTION_01,#function
FUNCTION_01:
add %g0, 12, %l7
ld [%l7 + my_array], %l7
...
ret
restore
LABEL_01(end):
.size FUNCTION_01,LABEL_01(end)-FUNCTION
所以我嘗試在function_01做的是訪問4個元素我的陣列。然而,當我嘗試編譯上面裝配了SPARC架構我得到以下錯誤:
(.text+0x75c): relocation truncated to fit: R_SPARC_13 against `.data'
collect2: ld returned 1 exit status
不知道從這個錯誤中做什麼。這是否意味着數組很大或者我在代碼中有其他錯誤?