Fix an illegal memory access triggered when trying to examine an input file containin...
[deliverable/binutils-gdb.git] / ld / scripttempl / aix.sc
index d592dbe59f1b787df93b06b41cdb8cfb6af79f18..5a9d04d64a41f61947e48c93a35ead2a2e152436 100644 (file)
@@ -2,8 +2,20 @@
 # AIX always uses shared libraries.  The section VMA appears to be
 # unimportant.  The native linker aligns the sections on boundaries
 # specified by the -H option.
+#
+# Copyright (C) 2014-2020 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
 
 cat <<EOF
+/* Copyright (C) 2014-2020 Free Software Foundation, Inc.
+
+   Copying and distribution of this script, with or without modification,
+   are permitted in any medium without royalty provided the copyright
+   notice and this notice are preserved.  */
+
 OUTPUT_ARCH(${ARCH})
 ${RELOCATING+${LIB_SEARCH_DIRS}}
 ${RELOCATING+ENTRY (__start)}
@@ -11,7 +23,7 @@ SECTIONS
 {
   .pad 0 : { *(.pad) }
 
-  . = 0x10000000;
+  . = ALIGN (0x10000000 + SIZEOF_HEADERS, 32);
   .text ${RELOCATING-0} : {
     ${RELOCATING+PROVIDE (_text = .);}
     *(.text)
@@ -24,7 +36,8 @@ SECTIONS
     *(.tb)
     ${RELOCATING+PROVIDE (_etext = .);}
   }
-  . = ALIGN (0x10000000);
+
+  . = ALIGN (ALIGN (0x10000000) + (. & 0xfff), 32);
   .data . : {
     ${RELOCATING+PROVIDE (_data = .);}
     *(.data)
@@ -54,7 +67,7 @@ SECTIONS
   .loader : {
     *(.loader)
   }
-  
+
   .debug : {
     *(.debug)
   }
This page took 0.024063 seconds and 4 git commands to generate.