This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: gc sections and .eh_frame
Alan Modra wrote:
On Tue, Jun 07, 2005 at 06:49:00PM +0100, Jonathan Larmour wrote:
But now I'm using the powerpc architecture where the stuff usually in
.gcc_except_table is placed in .rodata instead. If the object file has
nothing else in .rodata, then that section is also being GC'd in the final
link. And Bad Things Happen.
Which powerpc target? What compiler version?
powerpc-eabi, gcc 3.4.4.
From a brief foray into the GCC sources, I believe the use of
gcc_except_table depends on the existence of TARGET_ASM_NAMED_SECTION,
which is not defined for any powerpc other than rs6000-xcoff.
There are probably other targets than powerpc that don't have
TARGET_ASM_NAMED_SECTION too. From a glance, SuperH doesn't either at least.
I still don't have an understanding as to why sections referenced (by
reloc) from .eh_frame shouldn't be kept safe from GC. Marking them as KEEP
in the linker script just means that you've got one bit of code trying to
stop such sections being included, and another bit in the linker script
forcing them to be. It seems pointless and breaks existing working linker
scripts, nevermind the powerpc issue.
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine