[fpc-pascal] Building trunk
florian at freepascal.org
Sun Nov 25 14:15:48 CET 2018
Am 25.11.2018 um 13:58 schrieb Jonas Maebe:
> On 25/11/18 13:51, Florian Klämpfl wrote:
>> I am not aware that somewhere a fixed offset is applied. All info is read from the auxiliary data and the header.
> You can have a load address offset in case there is a PT_PHDR.
> From http://www.gabriel.urdhr.fr/2015/01/22/elf-linking/ :
> // Simplified code from the GNU dynamic linker source code:
> for (ph = phdr; ph < &phdr[phnum]; ++ph)
> if (ph->p_type == PT_PHDR)
> main_map->l_addr = (ElfW(Addr)) phdr - ph->p_vaddr;
> There doesn't seem to be one in Colin's program though.
Indeed. The program header itself seems to be wrong/interpreted wrong.
More information about the fpc-pascal