Browse Source

* add SIZEOF_HEADERS to the start address of the text section for ARMEL
(fix by thexception, mantis #14100)
* changed hardcoded "+0x100" for the default linker script also into
"+ SIZEOF_HEADERS"

git-svn-id: trunk@13418 -

Jonas Maebe 16 years ago
parent
commit
5eb7a398e0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/systems/t_linux.pas

+ 2 - 2
compiler/systems/t_linux.pas

@@ -628,7 +628,7 @@ begin
           add('SECTIONS');
           add('SECTIONS');
           add('{');
           add('{');
           add('  /* Read-only sections, merged into text segment: */');
           add('  /* Read-only sections, merged into text segment: */');
-          add('  PROVIDE (__executable_start = 0x8000); . = 0x8000;');
+          add('  PROVIDE (__executable_start = 0x8000); . = 0x8000 + SIZEOF_HEADERS;');
           add('  .interp         : { *(.interp) }');
           add('  .interp         : { *(.interp) }');
           add('  .note.gnu.build-id : { *(.note.gnu.build-id) }');
           add('  .note.gnu.build-id : { *(.note.gnu.build-id) }');
           add('  .hash           : { *(.hash) }');
           add('  .hash           : { *(.hash) }');
@@ -847,7 +847,7 @@ begin
           add('SECTIONS');
           add('SECTIONS');
           add('{');
           add('{');
           {Read-only sections, merged into text segment:}
           {Read-only sections, merged into text segment:}
-          add('  PROVIDE (__executable_start = 0x010000); . = 0x010000 +0x100;');
+          add('  PROVIDE (__executable_start = 0x010000); . = 0x010000 + SIZEOF_HEADERS;');
           add('  .interp         : { *(.interp) }');
           add('  .interp         : { *(.interp) }');
           add('  .hash           : { *(.hash) }');
           add('  .hash           : { *(.hash) }');
           add('  .dynsym         : { *(.dynsym) }');
           add('  .dynsym         : { *(.dynsym) }');