search for: bss_seg

Displaying 4 results from an estimated 4 matches for "bss_seg".

2001 Apr 10
3
DLL at fixed location and memory sharing between executables
...here a way to get the following to work under WINE? (i.e. to get two executables to share global memory as they do under windows) We have a DLL that is at a specified memory location. At the top of the code a variable is declared as follows: #pragma data_seg( "global_mem" ) #pragma bss_seg( "global_mem" ) unsigned uAttachmentCount = 0; Now.. The main program links to that DLL and as part of the DllMain it increments that count. The main program executes another program. That other program also links to that DLL. Under Windows the DLL is loaded into a single space in memo...
2017 Mar 14
2
[cfe-dev] proposal - pragma section directive in clang
...e with this, although I think using metadata here wouldn't be right - don't we need to use attributes when dropping metadata would cause miscompiles? I was considering adding an attributeset to global variables, so we'd have something like: global i32* @g = i32 0, #0 #0 = attributes {bss_seg="...", text_seg="...", data_seg="..."} Cheers, James On Tue, 14 Mar 2017 at 18:15 Reid Kleckner <rnk at google.com> wrote: > Is that actually an important use case? It sounded like it wasn't, and if > we pursue option 3, we need to staple three pie...
2017 Mar 10
3
[cfe-dev] proposal - pragma section directive in clang
...NOBITS/PROGBITS) by textual matching on the section name > (gross, but the fix is well beyond our scope). > > Given that documentation, you can also see why the Microsoft compatibility > option *almost* met our requirements - all except the behaviour in this > case: > > #pragma bss_seg('.bss.mybss') > int i; // Microsoft extension will put i in .bss.mybss > int j = 0; // Microsoft extension will put j in .data, whereas we really > need it in .bss.mybss > > So to specifically answer your questions: > > In ARM Compiler 5, all pragmas are pushable and po...
2017 Mar 14
2
[cfe-dev] proposal - pragma section directive in clang
Thanks Reid/Jonathon for your replies. Reid, An important case against module level flags is that it wont allow changing or resetting section names e.g. int a; #pragma clang section bss = "xyz" int b; In case above, users would like to see only 'b' placed in 'xyz' and not 'a' as well. Link pointed to by Jonathon seems to require same behavior.