programming:compiling_a_compiler
差異處
這裏顯示兩個版本的差異處。
| programming:compiling_a_compiler [2007/02/25 14:41] – 建立 wenpei | programming:compiling_a_compiler [2007/02/25 14:44] (目前版本) – wenpei | ||
|---|---|---|---|
| 行 81: | 行 81: | ||
| 是compiler CC1並沒有辦法compile這段程式,因為CC1看不懂程式中的' | 是compiler CC1並沒有辦法compile這段程式,因為CC1看不懂程式中的' | ||
| + | |||
| + | |||
| + | ====== Ken Thomposon 現身說法 ?! Compiling a Compiler 解答篇 ====== | ||
| + | by 8123033 穆信成 | ||
| + | |||
| + | http:// | ||
| + | |||
| + | Comp.lang.lisp 有一段時間挺混亂的. 一個Lisp討論區, | ||
| + | |||
| + | 就在這時候, | ||
| + | |||
| + | 就在 comp.lang.lisp 正為了一些 UNIX / C 的問題吵得興高采 烈之際, 大家又回想起了這個老故事. 於是有人問了, | ||
| + | |||
| + | 終於有人在翻出Ken Thomposon的 email address後, 親自去向他 本人求證了. Ken 的回信說, | ||
| + | |||
| + | 原來, | ||
| + | |||
| + | Unix Support Group 也不急著找 Ken 算帳, 倒是用很妙的方法 解決了這個特洛伊木馬. 能直接產生目的碼的 compiler 大都有 一個 -S 的選項, 亦即要 compiler 產生組合語言檔, | ||
| + | |||
| + | Ken 說, 這個特洛伊木馬僅在他們之間被當作一個惡作劇的小把 戲, 從來沒有流出去過. 得到這個答案的 Jay R. Ashworth 很 得意地把這封 email 貼了出來, | ||
| + | < | ||
| + | --------------------------------------------------------- | ||
| + | |||
| + | Proving that the real Mrs. Robinson stood up. | ||
| + | |||
| + | It occured to me last week that [email protected] is _still_ a valid address, 25 years later... so I asked. Here, from Ken himself, is the Real Story: | ||
| + | ) From [email protected] Sun Apr 23 14:42 EDT 1995 | ||
| + | ) Received: from plan9.att.com by IntNet.net (5.x/ | ||
| + | ) id AA19375; Sun, 23 Apr 1995 14:42:51 -0400 | ||
| + | ) Message-Id: < | ||
| + | ) From: [email protected] | ||
| + | ) To: [email protected] | ||
| + | ) Date: Sun, 23 Apr 1995 14:39:39 EDT | ||
| + | ) Content-Type: | ||
| + | ) Content-Length: | ||
| + | ) Status: RO | ||
| + | ) | ||
| + | ) | ||
| + | |||
| + | thanks for the info. i had not seen | ||
| + | ) that newsgroup. after you pointed it | ||
| + | ) out, i looked up the discussion. | ||
| + | ) | ||
| + | ) writing to news just causes more | ||
| + | ) misunderstandings in the future. there | ||
| + | ) is no way to win. | ||
| + | [ | ||
| + | |||
| + | note: I asked him if he minded my posting the reply, he had no objection ] ) fyi: the self reproducing cpp was | ||
| + | ) installed on OUR machine and we | ||
| + | ) enticed the "unix support group" | ||
| + | ) (precursor to usl) to pick it up | ||
| + | ) from us by advertising some | ||
| + | ) non-backward compatible feature. | ||
| + | ) that meant they had to get the | ||
| + | ) binary and source since the source | ||
| + | ) would not compile on their binaries. | ||
| + | ) | ||
| + | ) they installed it and in a month or | ||
| + | ) so, the login command got the trojan | ||
| + | ) hourse. later someone there noticed | ||
| + | ) something funny in the symbol table | ||
| + | ) of cpp and were digging into the | ||
| + | ) object to find out what it was. at | ||
| + | ) some point, they compiled -S and | ||
| + | ) assembled the output. that broke | ||
| + | ) the self-reproducer since it was | ||
| + | ) disabled on -S. some months later | ||
| + | ) the login trojan hourse also went | ||
| + | ) away. | ||
| + | ) | ||
| + | ) the compiler was never released | ||
| + | ) outside. | ||
| + | ) | ||
| + | ) ken | ||
| + | |||
| + | Everyone: please save this post, so the next time the question comes up, | ||
| + | you can just go look. :-) | ||
| + | |||
| + | Cheers, | ||
| + | -- jr 'will bug legends for food' a | ||
| + | -- | ||
| + | Jay R. Ashworth High Technology Systems Consulting Ashworth | ||
| + | Designer Linux: The Choice of a GNU Generation & Associates | ||
| + | ka1fjx/4 "I minored in babbling in college... and got +1 813 790 7592 | ||
| + | [email protected] honors in it." --Brian Heath NIC: jra3 | ||
| + | |||
| + | Unix System Lab | ||
| + | </ | ||
programming/compiling_a_compiler.1172385672.txt.gz · 上一次變更: (外部編輯)
