Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 07-27-2010, 10:09
metr0 metr0 is offline
Friend
 
Join Date: Apr 2009
Posts: 65
Rept. Given: 19
Rept. Rcvd 11 Times in 5 Posts
Thanks Given: 2
Thanks Rcvd at 2 Times in 2 Posts
metr0 Reputation: 11
Although the MSDN doesn't directly say so, my guess would be that manually assigning a section the string shall be placed in (explicitly allocating the space) makes the linker think of it as something external - why would one want to explicitly allocate/assign it if not for specific reasons? You're taking the trouble, so the linker might assume you know what you're doing.

Or it's just due to some internal MS design issues no one will ever know more about.
Reply With Quote
  #2  
Old 07-27-2010, 22:17
ArC ArC is offline
VIP
 
Join Date: Jan 2003
Location: NTOSKRNL.EXE
Posts: 172
Rept. Given: 0
Rept. Rcvd 1 Time in 1 Post
Thanks Given: 5
Thanks Rcvd at 17 Times in 12 Posts
ArC Reputation: 1
The bevaviour is the same for variables without manual section assignment.

It would be interesting to know whether other versions of link behave in the same way. Unfortunately I uninstalled my 2008 Express install in favour of 2010 so I can't check myself.
Reply With Quote
  #3  
Old 07-28-2010, 05:50
bilbo bilbo is offline
Friend
 
Join Date: Jul 2004
Posts: 103
Rept. Given: 36
Rept. Rcvd 15 Times in 12 Posts
Thanks Given: 15
Thanks Rcvd at 17 Times in 11 Posts
bilbo Reputation: 15
Well, tried on VC6 (link 6.00.8168): exactly the same behaviour,
even if I remove the three lines
Code:
#pragma code_seg(SECTION_NAME)  // push not understood
#pragma comment(linker, "/SECTION:"SECTION_NAME",RWE")
__declspec(allocate(SECTION_NAME))
and put everyting in ".text" section

Regards, bilbo
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Armadillo Environment Variables Finder 1.2 rukov Community Tools 3 12-16-2015 01:59
2004 Global Piracy Study Shub-Nigurrath General Discussion 2 07-13-2004 20:51
Tool to zero unused space??? yaa General Discussion 1 10-09-2003 20:31


All times are GMT +8. The time now is 03:40.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )