This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: __seg_gs specifier in g++
- From: 陳韋任 <chenwj dot cs97g at g2 dot nctu dot edu dot tw>
- To: "J.W. Jagersma" <jwjagersma at gmail dot com>
- Cc: Jonathan Wakely <jwakely dot gcc at gmail dot com>, gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 27 Mar 2017 21:33:33 +0800
- Subject: Re: __seg_gs specifier in g++
- Authentication-results: sourceware.org; auth=none
- References: <CAPLG5jbp8Tzs=M-fuhTb9ckQ1To=CQXrF=rg8CUE5Fwx6rv3ew@mail.gmail.com> <CAFSLk9dn+jPwpTHAXhi5am7X4uqcUMBbg6y0S4Dw34yMKhvWiQ@mail.gmail.com> <CAPLG5jY2hb=X10uuBapnbSqYPTZAv+7S8SFUJm0Xxh0BKLQ3Hw@mail.gmail.com> <CAPLG5jZeOHKBR4vmc6AvSKARh91EHDr6CozTqvDHiMt-TSKohQ@mail.gmail.com> <CAH6eHdRhhMDeY9syR4HTWBET0DuVS2u0b6jhBfP+yGjC3Lb31w@mail.gmail.com> <CAPLG5jaBQq1kuBvK3rj=C0_jmMpAcFLUQNs0+Dcdjjap27wKFw@mail.gmail.com>
Maybe you can write the code needs __seg_gs in C, compile and link it
with other C++ files, as a workaround.
HTH,
chenwj
2017-03-27 21:22 GMT+08:00 J.W. Jagersma <jwjagersma@gmail.com>:
> I don't see any mention of C++ specifically on that page... but is
> there any reason it's not implemented? It would be very useful, right
> now I'm stuck using inline assembly to access non-ds segments.
> Also found this (unanswered) bug report asking about the same thing:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69549
>
> On 27 March 2017 at 12:16, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>> On 26 March 2017 at 17:04, J.W. Jagersma <jwjagersma@gmail.com> wrote:
>> On 26 March 2017 at 05:39, J.W. Jagersma <jwjagersma@gmail.com> wrote:
>>>> However I just found that it does compile when it's a .c file, but not
>>>> as a .cpp file. Is __seg_gs only implemented in C for some reason?
>>
>> Yes, that is true according to the docs:
>> https://gcc.gnu.org/onlinedocs/gcc/Named-Address-Spaces.html
--
Wei-Ren Chen (陳韋任)
Homepage: http://people.cs.nctu.edu.tw/~chenwj