On 16/09/2010 12:56, Manuel M T Chakravarty wrote:
Simon Marlow:
On 16/09/2010 04:09, Ben Lippmeier wrote:
The size of each section can only be 0xffffff (16 MiB). That
means we'd already used 92% of the available space in the text
section before the recent changes.

Really?  Surely the size of the text section can't be limited to
16MB, there must be shared libraries that exceed that.  If the
limit is really on the size of a section, then we'll run into
trouble with the dynamic version of the GHC library too, and
splitting it up would be painful (we assume that all modules of a
package reside in the same shared library, to avoid having to make
expensive dynamic references all the time).

Isn't it just that you can't have a "scattered relocation" with an
offset greater than 0xffffff?

So if it is due to a scattered relocation, why is there a scattered
relocation at all?  I thought these were to support the PPC
instruction set where you have to split addresses into multiple
pieces, and x86 doesn't need them.

Scattered relations are not used on X86_64, but they are used on i386
(not just PPC).  They are definitely used for lazy pointers.  (It
says so in the ABI document.)  I vaguely remember, I have seen them
used in other situations, too, when I debugged Linker.c for Snow
Leopard.  For example, the GMP library uses some global variables to
determine the routines used for memory allocation.  I think the
references to these global pointers were scattered relocations, too.

Ok, so scattered relocs are needed on x86. But does that mean that shared libraries will be limited by the same 16MB-per-section restriction too?

Cheers,
        Simon

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to