Sun/Oracle C++ compiler patch
Nick Clifton
nickc@redhat.com
Mon Apr 11 15:40:00 GMT 2011
Hi Chris,
> I'm not really sure that the "ONLY_IF_RW" in the linker script maps onto
> the sh_flags field having the SHF_WRITE bit turned on in the section
> header table. Could you confirm that?
It does.
> Currently our exception range sections are writable, but I haven't been
> able to confirm that's necessary because of fixups by the C++ runtime
> system. If it's not necessary or if we change it later, it would be
> nice if the linker didn't need more modification.
Agreed.
> Is there any harm in allowing the same behavior if our sections later
> become read-only?
None.
> .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { *(.gcc_except_table
> .gcc_except_table.*) }
> + .exception_ranges ${RELOCATING-0} : ONLY_IF_RO { *(.exception_ranges
> .exception_ranges*) }
> .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { *(.gcc_except_table
> .gcc_except_table.*) }
> + .exception_ranges ${RELOCATING-0} : ONLY_IF_RW { *(.exception_ranges
> .exception_ranges*) }
The patch looks OK to me, and so I have checked it in along with this
changelog entry. I did take Tristan's suggestion however and so I added
a comment explaining where the .exception_ranges section originates.
Cheers
Nick
ld/ChangeLog
2011-04-11 Chris Quenelle <chris.quenelle@oracle.com>
* scripttempl/elf.sc (.exception_ranges): Add new section.
More information about the Binutils
mailing list