This is the mail archive of the
mailing list for the GCC project.
Re: why isn't the .eh_frame section marked READONLY?
- To: Joe Buck <jbuck at synopsys dot com>
- Subject: Re: why isn't the .eh_frame section marked READONLY?
- From: Jason Merrill <jason at cygnus dot com>
- Date: 02 Jun 1998 18:03:52 -0700
- Cc: schwab at issan dot informatik dot uni-dortmund dot de, egcs at cygnus dot com
- References: <199806022116.OAA27349@atrus.synopsys.com>
>>>>> Joe Buck <jbuck@Synopsys.COM> writes:
> OK, clearly we can't make it read-only or not based on PIC vs non-PIC, or
> no one can link (at least with linkers that want all contributions to the
> same section to have the same attributes). But the text section is
> read-only, even though in non-PIC code it contains relocations. So
> clearly relocations don't prevent a section from being marked read-only.
Some linkers complain about relocs in read-only sections in shared objects.
In any case, I was just following the established pattern; see the various
definitions of SELECT_SECTION. If -fpic, anything with an initializer that
contains a reloc goes into a writable section. .ctors and .dtors are also
writable, for the same reason.