Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site msdc.UUCP Path: utzoo!linus!decvax!ittvax!dcdwest!sdcsvax!akgua!gatech!msdc!dan From: dan@msdc.UUCP Newsgroups: net.unix-wizards Subject: pcc shared string question Message-ID: <106@msdc.UUCP> Date: Wed, 25-Jul-84 16:28:08 EDT Article-I.D.: msdc.106 Posted: Wed Jul 25 16:28:08 1984 Date-Received: Sat, 28-Jul-84 06:10:21 EDT Organization: Medical Systems Development Corp., Atlanta Lines: 25 I have a family of libraries that have bunches of embedded double-quoted strings (about 30KB or so). What I want to do is arrange to put all the strings in shared text space (we're running 4.Xbsd on VAXen). Since the "xstr" stuff is cumbersome with this much code, what I think I want is something on the order of the "-R" assembler option for just initialized strings. After perusing the "pcc" code, and examining reams of assembly output, it seems to me that double-quoted strings are output into data segments 1 and 2, while static data declarations go in segment 0. Thus, it looks like I can add an option to "ccom" (and "cc") that affects only the STRNG and ISTRNG cases in "locctr()". When set, it causes the generation of ".text 1" and ".text 2" in place of ".data 1" and ".data 2" respectively. (I could also do this with the old "asm.sed" trick, but I don't think I want to rewrite all the Makefiles.) My question is thus directed at all the "pcc" wizards out there: None of the libraries ever modify double-quoted literals, but they do modify static data (which should still appear under data segment 0). I'm not all that concerned about portability, since on other machines all that will happen is that the programs will get bigger again. So, what kind of trouble am I buying here? What have I missed? Dan Forsyth (akgua!gatech!msdc!dan, duke!mcnc!msdc!dan) Medical Systems Development Corporation, Atlanta, GA