www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - Data segment sharing in 32 bits

↑ ↓ ← "Rajiv Bhagwat" <dataflow vsnl.com> writes:
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.
Apr 04 2001
↑ ↓ "Walter" <walter digitalmars.com> writes:
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

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.

Apr 04 2001
↑ ↓ "Rajiv Bhagwat" <dataflow vsnl.com> writes:
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

 with obj2asm. You'll also need to segregate all the data going into

 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


(instead of marking the entire data sharable), similar to VC

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.


Apr 07 2001
↑ ↓ "Walter" <walter digitalmars.com> writes:
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

 with obj2asm. You'll also need to segregate all the data going into

 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


(instead of marking the entire data sharable), similar to VC

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.



Apr 07 2001
↑ ↓ → "Rajiv Bhagwat" <dataflow vsnl.com> writes:
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


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

 with obj2asm. You'll also need to segregate all the data going into

 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


(instead of marking the entire data sharable), similar to VC

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.




Apr 07 2001