[fpc-pascal] Re: Problems with "relocation errors"
Sven Barth
pascaldragon at googlemail.com
Sat Nov 6 20:30:08 CET 2010
On 06.11.2010 18:11, Marco van de Voort wrote:
> In our previous episode, Sven Barth said:
>>>
>>> AFAIK PE DLLs are always relocatable while it's not true for ELF SOs. So,
>>> whenever you need to create it, always pass -fPIC to ALL used units and
>>> their dependencies.
>>
>> PE images themselves aren't relocatable. All addresses are relative to
>> the defined base address. The loader must manually recalculate the
>> addresses if the binary can't be loaded at the base address.
>>
>> See also here: http://en.wikipedia.org/wiki/Portable_Executable#Relocations
>
> They _are_ relocatable (it contains structures to relocate), but _not_
> position independant (you must relocate if load address changes)
I threw two things into one pot... I'm sorry :)
Regards,
Sven
More information about the fpc-pascal
mailing list