Subject: Re: a.out problems
To: Krister Walfridsson <>
From: Todd Whitesel <>
List: tech-toolchain
Date: 07/27/1998 22:25:14
> This seems to be due to doing the relocations in a memory area 
> different from where the data will be placed, and then copies the data
> without compensating the relocation.

Are you sure is actually relocating things? Perhaps you are simply
seeing whatever happened to be left in the data section after the library
was built.

> I'd be really happy if someone could look into this (or at lest give me
> some ideas how to fix, since it is one of the two issues remaining
> for my binutils port to be useable. (I will probably have to change the 
> behaviour of binutils, or else it will not be possible to use it with
> NetBSD-1.3 or older, but it would simplify my job if I could keep this
> behaviour for the moment.)

I am not a binutils expert, but I helped implement support for initialized
pointers in the PIC/PID mode of the Green Hills embedded toolchain. Usually
PIC produces something that needs no relocation whatsoever, but that means
(a) initialized pointers are not supported, or (b) you need toolchain support
for a constructor-like function that adds the runtime-linktime offset to each
initialized pointer before anything may call into the library.

Do you have evidence that initialized pointers work in some other case?

Todd Whitesel
toddpw @