Re: The different groups and segments of object files

Hans-Peter Diettrich <DrDiettrich1@netscape.net>
Sat, 20 Jun 2020 16:01:10 +0200

          From comp.compilers

Related articles
The different groups and segments of object files johann@myrkraverk.com (Johann 'Myrkraverk' Oskarsson) (2020-06-19)
Re: The different groups and segments of object files gah4@u.washington.edu (2020-06-19)
Re: The different groups and segments of object files DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2020-06-20)
Re: The different groups and segments of object files gah4@u.washington.edu (2020-06-21)
Re: The different groups and segments of object files johann@myrkraverk.invalid (Johann 'Myrkraverk' Oskarsson) (2020-06-25)
Re: The different groups and segments of object files johann@myrkraverk.invalid (Johann 'Myrkraverk' Oskarsson) (2020-06-25)
Re: The different groups and segments of object files DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2020-06-25)
Re: The different groups and segments of object files DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2020-06-25)
Re: The different groups and segments of object files DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2020-06-26)
[1 later articles]
| List of all articles for this month |
From: Hans-Peter Diettrich <DrDiettrich1@netscape.net>
Newsgroups: comp.compilers
Date: Sat, 20 Jun 2020 16:01:10 +0200
Organization: Compilers Central
References: 20-06-004
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="42434"; mail-complaints-to="abuse@iecc.com"
Keywords: object, history
Posted-Date: 20 Jun 2020 16:04:01 EDT

Am 19.06.2020 um 17:22 schrieb Johann 'Myrkraverk' Oskarsson:


> When I am defining my own compiler, do the traditional names of object
> file segments, _TEXT, _DATA, STACK, _BSS, CONST (to name a few from the
> MS manual) any meaning?  When I place my code in a _TEXT segment, the
> disassembler will show a list of the instructions; this does not happen
> if I name the segment FOO.  Is there any particular reason I want my
> code in a _TEXT segment rather than FOO?


I think that it's not the segment name that enforces special handling
but segment attributes. Eventually these attributes are defined in the
various segment groups only, not at segment level?


It depends on the target OS and hardware whether deailed hardware
protection is applied to memory segments. Code segments can be read-only
or execute-only, all others non-execute. Const segments also can/should
be read-only. The same protection schemes can apply to paged memory. A
compiler only can assign attributes to memory sections, the use of these
attributes depends on the linker and loader for the target platform.


DoDi


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.