歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> uclinux-2008R1-RC8(bf561)到VDSP5的移植(50):jiffies_64的定義問題

uclinux-2008R1-RC8(bf561)到VDSP5的移植(50):jiffies_64的定義問題

日期:2017/3/3 16:43:27   编辑:關於Linux

在uclinux中,jiffies_64的聲明為:

#define __jiffy_data __attribute__((section(".data")))
extern u64 __jiffy_data jiffies_64;

其定義在kernel/timer.c:

u64 __jiffy_data jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES;

這樣的定義看起來沒有什麼問題,但是在編譯kernel/timer.c時卻造成了一個非常奇怪的錯誤,出錯提示為:

[Error ea1008] "e:/temp/acc08143dff000/acc08143dff001.s":3601 '.epcdata':
The symbol has already been defined and cannot be redefined.
[Error ea1008] "e:/temp/acc08143dff000/acc08143dff001.s":3608 '.epcdata.end':
The symbol has already been defined and cannot be redefined.

但是如果將定義改為:

extern u64 /*__jiffy_data*/ jiffies_64;
u64 /*__jiffy_data*/ jiffies_64 __cacheline_aligned_in_smp = INITIAL_JIFFIES;

則沒有任何問題。

猜測這和u64這種數據類型有關。

Copyright © Linux教程網 All Rights Reserved