Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
April 05, 2001 Data segment sharing in 32 bits | ||||
---|---|---|---|---|
| ||||
Dear Walter, Here is a request to implement sharing of specifically marked data segments (instead of marking the entire data sharable), similar to VC implementation. i.e. Currently, there is no data_seg pramga in DMC. (Or is there?...) #pragma data_seg(".shared") int i; char s[30]; Myclass mc; #pragma data_seg() Please comment. |
April 05, 2001 Re: Data segment sharing in 32 bits | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rajiv Bhagwat | There is currently no mechanism for naming the data segment from the compiler. The program patchobj, however, can rename it with: patchobj test.obj -l_DATA _SHARED which will rename the _DATA segment to _SHARED. You can verify this working with obj2asm. You'll also need to segregate all the data going into _SHARED into a separate source file. -Walter Rajiv Bhagwat wrote in message <9ah1n4$10kj$1@digitaldaemon.com>... >Dear Walter, > >Here is a request to implement sharing of specifically marked data segments (instead of marking the entire data sharable), similar to VC implementation. >i.e. Currently, there is no data_seg pramga in DMC. (Or is there?...) > >#pragma data_seg(".shared") >int i; >char s[30]; >Myclass mc; >#pragma data_seg() > >Please comment. > > > |
April 07, 2001 Re: Data segment sharing in 32 bits | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | I have 'patchobj' circa 1995, it does not support -I flag. The latest distribution does not contain a newer version. How can I obtain the proper version? Other than that, this looks like a workable solution. - Rajiv Walter <walter@digitalmars.com> wrote in message news:9ah3t7$11hs$1@digitaldaemon.com... > There is currently no mechanism for naming the data segment from the compiler. > > The program patchobj, however, can rename it with: > > patchobj test.obj -l_DATA _SHARED > > which will rename the _DATA segment to _SHARED. You can verify this working > with obj2asm. You'll also need to segregate all the data going into _SHARED > into a separate source file. > > -Walter > > Rajiv Bhagwat wrote in message <9ah1n4$10kj$1@digitaldaemon.com>... > >Dear Walter, > > > >Here is a request to implement sharing of specifically marked data segments > >(instead of marking the entire data sharable), similar to VC > implementation. > >i.e. Currently, there is no data_seg pramga in DMC. (Or is there?...) > > > >#pragma data_seg(".shared") > >int i; > >char s[30]; > >Myclass mc; > >#pragma data_seg() > > > >Please comment. > > > > > > > > |
April 07, 2001 Re: Data segment sharing in 32 bits | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rajiv Bhagwat Attachments: | Attached. Rajiv Bhagwat wrote in message <9amgjp$2o2e$1@digitaldaemon.com>... >I have 'patchobj' circa 1995, it does not support -I flag. The latest distribution does not contain a newer version. How can I obtain the proper version? > >Other than that, this looks like a workable solution. >- Rajiv > > >Walter <walter@digitalmars.com> wrote in message news:9ah3t7$11hs$1@digitaldaemon.com... >> There is currently no mechanism for naming the data segment from the compiler. >> >> The program patchobj, however, can rename it with: >> >> patchobj test.obj -l_DATA _SHARED >> >> which will rename the _DATA segment to _SHARED. You can verify this >working >> with obj2asm. You'll also need to segregate all the data going into >_SHARED >> into a separate source file. >> >> -Walter >> >> Rajiv Bhagwat wrote in message <9ah1n4$10kj$1@digitaldaemon.com>... >> >Dear Walter, >> > >> >Here is a request to implement sharing of specifically marked data >segments >> >(instead of marking the entire data sharable), similar to VC >> implementation. >> >i.e. Currently, there is no data_seg pramga in DMC. (Or is there?...) >> > >> >#pragma data_seg(".shared") >> >int i; >> >char s[30]; >> >Myclass mc; >> >#pragma data_seg() >> > >> >Please comment. >> > >> > >> > >> >> > > |
April 07, 2001 Re: Data segment sharing in 32 bits | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Thanks! I made a mistake in reading l_DATA as I_DATA... (The switch is ell not eye! - The two look exactly identical in Arial.) Even the old one supports that. I found out after the new one failed on 'eye' also. The results are identical and could be verified by dumpobj. Thanks again. - Rajiv Walter <walter@digitalmars.com> wrote in message news:9amogd$2u9g$1@digitaldaemon.com... > Attached. > > Rajiv Bhagwat wrote in message <9amgjp$2o2e$1@digitaldaemon.com>... > >I have 'patchobj' circa 1995, it does not support -I flag. The latest distribution does not contain a newer version. How can I obtain the proper > >version? > > > >Other than that, this looks like a workable solution. > >- Rajiv > > > > > >Walter <walter@digitalmars.com> wrote in message news:9ah3t7$11hs$1@digitaldaemon.com... > >> There is currently no mechanism for naming the data segment from the compiler. > >> > >> The program patchobj, however, can rename it with: > >> > >> patchobj test.obj -l_DATA _SHARED > >> > >> which will rename the _DATA segment to _SHARED. You can verify this > >working > >> with obj2asm. You'll also need to segregate all the data going into > >_SHARED > >> into a separate source file. > >> > >> -Walter > >> > >> Rajiv Bhagwat wrote in message <9ah1n4$10kj$1@digitaldaemon.com>... > >> >Dear Walter, > >> > > >> >Here is a request to implement sharing of specifically marked data > >segments > >> >(instead of marking the entire data sharable), similar to VC > >> implementation. > >> >i.e. Currently, there is no data_seg pramga in DMC. (Or is there?...) > >> > > >> >#pragma data_seg(".shared") > >> >int i; > >> >char s[30]; > >> >Myclass mc; > >> >#pragma data_seg() > >> > > >> >Please comment. > >> > > >> > > >> > > >> > >> > > > > > > > |
Copyright © 1999-2021 by the D Language Foundation