[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shared text, shared libs again




On Thu, 18 Jun 1998, Howard Chu wrote:

> The basic shared text scheme remains as before - all data is referenced
> relative to
> a global pointer in address register a4. This allows up to 64Kbytes to be
> directly
> addressed in a very efficient, position-independent manner. To extend its
> usable
> limits, this data/bss space must be divided into "small data" and "large
> data".
> Large data consists of any arrays or structures that are larger than 4
> bytes. Whenever these things are declared, they go into the "blockdata"
> segment, with only a pointer to
> the blockdata being stored in the "smalldata" segment. (Note that gcc is
> already smart enough to handle arrays & structs of 4 bytes or smaller as
> longwords, so they can still
> be manipulated efficiently.)

Instead of using word references, like it is currently done when using
-mbaserel with gcc, wouldn't it be easier to implement long references
than splitting stuff into a large and small data area? I know, this would
slow things down and extends the size of the executable. By the way, I'm
speaking of 68000 instruction set not 68030. For example:

  move $1234(a4),d0

would become something like

  move #$12345678,d4
  move $0(a4,d4.l),d0

This certainly is a lot longer, but I think when gcc is forced to avoid
using global variables, this won't become noteable. Maybe the execution
time is at the end as fast as absolute adressing. And for 68030 there
could also be the other possibility :o)

Some of you maybe already thought about this years ago when talking
about the -mbaserel feature for gcc, but I was not online at this time :o)

> Anyone else have ideas on making this all work?

A complete port of the binutils?

If you are working on the linker, I suggest, you take the latest source
from tu-harburg and speak with Guido Flohr, who also is working on the
linker.

jps