Andes Workshop

It is currently Tue Apr 16, 2024 11:05 pm

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: 如何將某個file的.text獨立成放在某一段?
PostPosted: Fri Jul 13, 2012 7:05 pm 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
這一篇和另外一篇是相同的。
viewtopic.php?f=23&t=592

這一篇改成某一個檔案的.text區獨立。
Code:
   .text1 : {
      foo.o (.text)
   } AT>RAM

   .text2 : {
      * (.text)
   } AT>ROM



Attachment:
test_ld.zip [6.05 KiB]
Downloaded 940 times


結果:
Code:
  [ 1] .text1            PROGBITS        00004000 002000 000018 00  AX  0   0  4
  [ 2] .text2            PROGBITS        00001000 001000 000018 00  AX  0   0  4
  [ 3] .sbss_w1          NOBITS          00004018 002018 00000c 00  WA  0   0  4
  [ 4] .sbss_w2          NOBITS          00001018 001018 00000c 00  WA  0   0  4


注意!要分開寫的foo.o (.text)必須要放在* (.text)的前面。
否則會* (.text)就包含了全部的.text,就不會把foo.o (.text)單獨置放。


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group