This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

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


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