Error in linker script when building with sysroot.
Original Reporter info from Mantis: DonAlfredo @DonAlfredo
-
Reporter name: Alfred
Original Reporter info from Mantis: DonAlfredo @DonAlfredo
- Reporter name: Alfred
Description:
If building with sysroot (using -XR as a compiler option), the custom linker script file contains an error preventing the executable from running.
(however, it does run using elevated (root) rights ...)
It all boils down to these line in t_linux.pas
if current_module.islibrary then
add(' . = 0 + SIZEOF_HEADERS;')
else
add(' PROVIDE (__executable_start = 0x0400000); . = 0x0400000 + SIZEOF_HEADERS;');
add(' . = 0 + SIZEOF_HEADERS;'); <------------------------------- ERROR !!!
As you can see, the last line of this code-snipped will always source the " . = 0 + SIZEOF_HEADERS;" !!
Additional information:
Same error in FPC fixes.
Would be good to fix fixes too.
Mantis conversion info:
- Mantis ID: 36345
- Platform: Linux x86_64
- Version: 3.3.1
- Fixed in version: 3.2.0
- Fixed in revision: 43571 (#a3be76e2)