Tru64 Unix
1753511 會員
5627 線上
108795 解決方案
發表新文章

請幫助我產生alpha executable binary

 
watermelonyu
教授

請幫助我產生alpha executable binary

因為做實驗要用到,

我在x86 linux安裝了一套alpha simulator。

我有試過使用cross compiler,

但產生的alpha執行檔是ELF format.

而simulator接受的是coff format.

但因為沒有alpha機器,無法產生需要的alpha執行檔。

請問有人願意幫忙我在alpha機器產生alpha執行檔嗎?

因為已經對這個simulator投入很多時間去分析,

但是就差在沒有辦法自己寫一個例子去run.

感激不盡!



附加檔案:原始的c code

E-mail: c214c@yahoo.com.tw
6則回覆 6
watermelonyu
教授

請幫助我產生alpha executable binary

Hi,



# uname -rp

V5.1 alpha

# sizer -v

Compaq Tru64 UNIX V5.1B (Rev. 2650); Tue Sep 5 13:05:32 CST 2006

# ls -l test.c

-rw-r--r-- 1 root system 4656 Sep 12 09:45 test.c

# sum test.c

41660 5 test.c

# tail -17 test.c

void main(int argc, char *argv[]) {





A = 0;

init_smt_barrier();



smt_fork(counter_slave1);

smt_fork(counter_slave2);

smt_fork(counter_slave3);

smt_fork(counter_slave4);

smt_fork(counter_slave5);

smt_fork(counter_slave6);

smt_fork(counter_slave7);



counter_master();



}

# gcc -g -o test test.c

test.c: In function `main':

test.c:272: warning: return type of `main' is not `int'

# ls -l test*

-rwxr-xr-x 1 root system 45424 Sep 12 09:47 test

-rw-r--r-- 1 root system 4656 Sep 12 09:45 test.c

# file test

test: COFF format alpha dynamically linked, demand paged executable or object

module not stripped - version 3.13-14

# sum test

15387 45 test

# cksum test

1240685940 45424 test

#



See the attachment!



Best regards,

Richard.
watermelonyu
教授

請幫助我產生alpha executable binary

非常非常感謝你願意伸出援手...

可以再勞煩你一件事

我所安裝的simulator作者提到

--------------------------------------

The simulator runs Alpha executables; however, to run on the simulator, the

executable has to be compiled with the following flags:



for gcc: -static -Xlinker -T -Xlinker 20000000 -Xlinker -D -Xlinker 30000000

--------------------------------------



所以可否請你幫我在編譯前加入這些參數。

真的很謝謝你!

watermelonyu
教授

請幫助我產生alpha executable binary

Hi,



# gcc -static -Xlinker -T -Xlinker 20000000 -Xlinker -D -Xlinker 30000000 test.c

# ls -l test.c a.out

-rwxr-xr-x 1 root system 400048 Sep 12 11:34 a.out

-rw-r--r-- 1 root system 4656 Sep 12 09:45 test.c

# gzip a.out

# ls -l test.c a.out*

-rwxr-xr-x 1 root system 171256 Sep 12 11:34 a.out.gz

-rw-r--r-- 1 root system 4656 Sep 12 09:45 test.c

#



Best regards,

Richard.
watermelonyu
教授

請幫助我產生alpha executable binary

謝謝你!
watermelonyu
教授

請幫助我產生alpha executable binary

你好!

很不好意思又要開口麻煩你,

因為我之前寫的c code有bug,

所以我重新整理了一些要測試simulator的程式。

請問你是否願意幫我重新編譯c code,

我在附檔附上了數個需要編譯的c code。

因為我實在找不出其他可以解決的方式

所以又來麻煩你...真的很抱歉

謝謝!

watermelonyu
教授

請幫助我產生alpha executable binary