This is the mail archive of the
mailing list for the GCC project.
Re: i386: does gcc work with CS â DS?
- From: Richard Henderson <rth at redhat dot com>
- To: "H. Peter Anvin" <hpa at zytor dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GCC development <gcc at gcc dot gnu dot org>
- Date: Wed, 03 Jun 2015 09:04:30 -0700
- Subject: Re: i386: does gcc work with CS â DS?
- Authentication-results: sourceware.org; auth=none
- References: <556E9434 dot 5010409 at zytor dot com>
On 06/02/2015 10:44 PM, H. Peter Anvin wrote:
> Hi guys, another low level question:
> Obviously gcc for i386 requires DS = ES = SS (with FS and GS don't
> care), but does gcc also require CS = DS?
I don't believe so. In these modern times we don't place switch statement
tables, or other constant data, in the .text section. Just map the correct
sections to the correct segments and you should be fine.
What advantage are you looking for?