[fpc-pascal] Building trunk

Jonas Maebe jonas at freepascal.org
Sun Nov 25 13:58:35 CET 2018


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.


Jonas



More information about the fpc-pascal mailing list