This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: S/390: Avoid relocations in .eh_frame section
- From: Ulrich Weigand <weigand at immd1 dot informatik dot uni-erlangen dot de>
- To: jakub at redhat dot com
- Cc: rth at redhat dot com (Richard Henderson), weigand at immd1 dot informatik dot uni-erlangen dot de (Ulrich Weigand), dje at watson dot ibm dot com, gcc-patches at gcc dot gnu dot org, uweigand at de dot ibm dot com
- Date: Wed, 20 Nov 2002 20:58:03 +0100 (MET)
- Subject: Re: S/390: Avoid relocations in .eh_frame section
Jakub Jelinek wrote:
> On Tue, Nov 19, 2002 at 02:26:16PM -0800, Richard Henderson wrote:
> > This would be DW_EH_PE_udata4 | DW_EH_PE_textrel, with the
> > base address registered with __register_frame_info_bases.
I've never quite understood that 'bases' stuff :-/ How would
I set this up? Don't new binutils completely eliminate the
need for __register_frame_XXX calls?
> > However, to my knowledge only ia64 has the segment-relative
> > relocation needed so that the result is relative to the
> > _first_ .text section, instead of the .text section of the
> > current object file.
We don't have that relocation, but it could be added if it
proves necessary ...
> Well, there is of course also the possibility to move the work
> to the linker optimization, ie. start with DW_EH_PE_sdata8 | DW_EH_PE_pcrel
> and if linker sees the shared library or binary is smaller than 2GB,
> rewrite it into DW_EH_PE_sdata4 | DW_EH_PE_pcrel.
> In fact this would be a IMO good idea for all 64-bit arches.
I like this idea much better ;-) Would this is be a common-code
optimization in binutils or platform-dependent?
> What I'm just wondering is the 4GB upper limit on shared libs,
> does s390x have separate jump (resp. call) forward and backward?
All instructions must be 2-byte aligned, so the 'relative long'
type instructions omit the always-zero low bit of pc-relative
displacements, yielding an effective range of +/- 4GB with a
32-bit signed displacement.
Bye,
Ulrich
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de