public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Why ctor and dtor sections aren't read-only? also linker script question.
@ 2000-04-12 11:29 Mathieu Gervais (LMC)
  0 siblings, 0 replies; only message in thread
From: Mathieu Gervais (LMC) @ 2000-04-12 11:29 UTC (permalink / raw)
  To: gcc-help

Hi,

 with gcc version 2.95.2 (19991024 (release)), when I compile a C++ file
under Solaris 2.6, the .ctor and .dtor sections aren't marked READ-ONLY.
Why is that? I though those sections contained *code* that you need to
execute to construct (destruct) some objects.
 
 Can I load them in a read-only memory? How would I do to set the
section readonly in the (GNU LD) linker script?(assuming I want to take
.o with non readonly section and produced a linked executable with the
equivalent .ctor and dtor marked readonly).

Bonus question : how do I get the default linker script of GNU ld for my
target? Is it compiled into the ld executable or is it somewhere else?

Thanks,

 *please reply also directly, I'm not on the list*


Mathieu

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-04-12 11:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-12 11:29 Why ctor and dtor sections aren't read-only? also linker script question Mathieu Gervais (LMC)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).