Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #2527

Re: The different groups and segments of object files

From Hans-Peter Diettrich <DrDiettrich1@netscape.net>
Newsgroups comp.compilers
Subject Re: The different groups and segments of object files
Date 2020-06-20 16:01 +0200
Organization Compilers Central
Message-ID <20-06-006@comp.compilers> (permalink)
References <20-06-004@comp.compilers>

Show all headers | View raw


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

Back to comp.compilers | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

The different groups and segments of object files Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.com> - 2020-06-19 23:22 +0800
  Re: The different groups and segments of object files gah4@u.washington.edu - 2020-06-19 14:12 -0700
    Re: The different groups and segments of object files gah4@u.washington.edu - 2020-06-21 01:50 -0700
    Re: The different groups and segments of object files Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2020-06-25 22:41 +0800
    Re: The different groups and segments of object files Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2020-06-25 22:40 +0200
      Re: The different groups and segments of object files Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2020-06-26 00:09 +0200
        Re: The different groups and segments of object files gah4@u.washington.edu - 2020-07-02 00:36 -0700
  Re: The different groups and segments of object files Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2020-06-20 16:01 +0200
    Re: The different groups and segments of object files Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2020-06-25 23:13 +0800
      Re: The different groups and segments of object files Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2020-06-25 22:52 +0200

csiph-web