ld: Add OTHER_PLT_SECTIONS
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 12 Nov 2017 15:25:26 +0000 (07:25 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 12 Nov 2017 15:25:36 +0000 (07:25 -0800)
OTHER_PLT_SECTIONS contains sections which should be placed right after
.plt section.

* emulparams/elf32_x86_64.sh (TINY_READONLY_SECTION): Renamed
to ...
(OTHER_PLT_SECTIONS): This.
* emulparams/elf_i386.sh: Likewise.
* emulparams/elf_iamcu.sh: Likewise.
* emulparams/elf_x86_64.sh: Likewise.
* scripttempl/elf.sc: Place ${OTHER_PLT_SECTIONS} just after
.plt.

ld/ChangeLog
ld/emulparams/elf32_x86_64.sh
ld/emulparams/elf_i386.sh
ld/emulparams/elf_iamcu.sh
ld/emulparams/elf_x86_64.sh
ld/scripttempl/elf.sc

index 2b6a334ace38f15174d392347dd77014a4776659..59aff56f6bc9a29b0305216efd6d6625425dba52 100644 (file)
@@ -1,3 +1,14 @@
+2017-11-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * emulparams/elf32_x86_64.sh (TINY_READONLY_SECTION): Renamed
+       to ...
+       (OTHER_PLT_SECTIONS): This.
+       * emulparams/elf_i386.sh: Likewise.
+       * emulparams/elf_iamcu.sh: Likewise.
+       * emulparams/elf_x86_64.sh: Likewise.
+       * scripttempl/elf.sc: Place ${OTHER_PLT_SECTIONS} just after
+       .plt.
+
 2017-11-09  H.J. Lu  <hongjiu.lu@intel.com>
 
        * emultempl/elf32.em (gld${EMULATION_NAME}_get_script): Reformat
index 03f9d830567f924b8d14922eef2794e5347bca5f..9ce6533bd9329ad3db5781ec454b0caa78167350 100644 (file)
@@ -21,8 +21,8 @@ LARGE_SECTIONS=yes
 LARGE_BSS_AFTER_BSS=
 SEPARATE_GOTPLT="SIZEOF (.got.plt) >= 24 ? 24 : 0"
 IREL_IN_PLT=
-# Reuse TINY_READONLY_SECTION which is placed right after .plt section.
-TINY_READONLY_SECTION="
+# These sections are placed right after .plt section.
+OTHER_PLT_SECTIONS="
 .plt.got      ${RELOCATING-0} : { *(.plt.got) }
 .plt.sec      ${RELOCATING-0} : { *(.plt.sec) }
 "
index 084497c23098fc041135b68774bc521641835827..2cef106e3dcde427f6a194e0bb9c85aa9cb0cd3f 100644 (file)
@@ -17,8 +17,8 @@ GENERATE_PIE_SCRIPT=yes
 NO_SMALL_DATA=yes
 SEPARATE_GOTPLT="SIZEOF (.got.plt) >= 12 ? 12 : 0"
 IREL_IN_PLT=
-# Reuse TINY_READONLY_SECTION which is placed right after .plt section.
-TINY_READONLY_SECTION="
+# These sections are placed right after .plt section.
+OTHER_PLT_SECTIONS="
 .plt.got      ${RELOCATING-0} : { *(.plt.got) }
 .plt.sec      ${RELOCATING-0} : { *(.plt.sec) }
 "
index 863027b57b4a2799efbb48e20c9f9922995c6252..d910b653c36cd87f486d9ed1a68dbe7f3a79b23c 100644 (file)
@@ -17,8 +17,8 @@ GENERATE_PIE_SCRIPT=yes
 NO_SMALL_DATA=yes
 SEPARATE_GOTPLT="SIZEOF (.got.plt) >= 12 ? 12 : 0"
 IREL_IN_PLT=
-# Reuse TINY_READONLY_SECTION which is placed right after .plt section.
-TINY_READONLY_SECTION="
+# These sections are placed right after .plt section.
+OTHER_PLT_SECTIONS="
 .plt.got      ${RELOCATING-0} : { *(.plt.got) }
 "
 
index 09f3cdac079c916a68da7587669ce17aca167747..d8c6e54894c0d8fbada96bfe2089746ac93130ff 100644 (file)
@@ -21,8 +21,8 @@ LARGE_SECTIONS=yes
 LARGE_BSS_AFTER_BSS=
 SEPARATE_GOTPLT="SIZEOF (.got.plt) >= 24 ? 24 : 0"
 IREL_IN_PLT=
-# Reuse TINY_READONLY_SECTION which is placed right after .plt section.
-TINY_READONLY_SECTION="
+# These sections are placed right after .plt section.
+OTHER_PLT_SECTIONS="
 .plt.got      ${RELOCATING-0} : { *(.plt.got) }
 .plt.sec      ${RELOCATING-0} : { *(.plt.sec) }
 "
index c0845c5952e5e11bc0275640be40f3a7bb3a65cd..9f291b359f804bbaa69c3db98b2303a486f6f3a9 100644 (file)
@@ -37,6 +37,7 @@
 #              writeable data sections.
 #      OTHER_GOT_SYMBOLS - symbols defined just before .got.
 #      OTHER_GOT_SECTIONS - sections just after .got.
+#      OTHER_PLT_SECTIONS - sections just after .plt.
 #      OTHER_SDATA_SECTIONS - sections just after .sdata.
 #      OTHER_BSS_SYMBOLS - symbols that appear at the start of the
 #              .bss section besides __bss_start.
@@ -484,7 +485,7 @@ cat <<EOF
     ${RELOCATING+${INIT_END}}
   } ${FILL}
 
-  ${TEXT_PLT+${PLT_NEXT_DATA-${PLT}}}
+  ${TEXT_PLT+${PLT_NEXT_DATA-${PLT} ${OTHER_PLT_SECTIONS}}}
   ${TINY_READONLY_SECTION}
   .text         ${RELOCATING-0} :
   {
@@ -549,7 +550,7 @@ cat <<EOF
   /* These sections are generated by the Sun/Oracle C++ compiler.  */
   .exception_ranges ${RELOCATING-0} : ONLY_IF_RO { *(.exception_ranges
   .exception_ranges*) }
-  ${TEXT_PLT+${PLT_NEXT_DATA+${PLT}}}
+  ${TEXT_PLT+${PLT_NEXT_DATA+${PLT} ${OTHER_PLT_SECTIONS}}}
 
   /* Adjust the address for the data segment.  We want to adjust up to
      the same address within the page on the next page up.  */
This page took 0.030094 seconds and 4 git commands to generate.