This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: why isn't the .eh_frame section marked READONLY?


>>>>> 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.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]