]> git.proxmox.com Git - qemu.git/blobdiff - ppc64.ld
configure: usbredir fixes
[qemu.git] / ppc64.ld
index d0f4d585f3f0f3a33de4ef7cb1dfa2ea71cadf64..e2dafa0b533bcf7a704639fb82fc041604902792 100644 (file)
--- a/ppc64.ld
+++ b/ppc64.ld
@@ -1,16 +1,9 @@
 /* Script for -z combreloc: combine and sort reloc sections */
 OUTPUT_FORMAT("elf64-powerpc", "elf64-powerpc",
-             "elf64-powerpc")
+             "elf64-powerpc")
 OUTPUT_ARCH(powerpc:common64)
 ENTRY(_start)
-SEARCH_DIR("/usr/powerpc64-unknown-linux-gnu/lib64"); 
-EARCH_DIR("/usr/lib/binutils/powerpc64-unknown-linux-gnu/2.16.164"); 
-EARCH_DIR("/usr/local/lib64"); SEARCH_DIR("/lib64"); SEARCH_DIR("/usr/lib64"); 
-EARCH_DIR("/usr/powerpc64-unknown-linux-gnu/lib"); 
-EARCH_DIR("/usr/lib/binutils/powerpc64-unknown-linux-gnu/2.16.1"); 
-EARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
+/* __DYNAMIC = 0;    */
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
@@ -61,9 +54,21 @@ SECTIONS
       *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
       *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
     }
-  .rel.plt        : { *(.rel.plt) }
-  .rela.plt       : { *(.rela.plt) }
-  .rela.tocbss   : { *(.rela.tocbss) }
+  .rel.plt      :
+  {
+    *(.rel.plt)
+    PROVIDE (__rel_iplt_start = .);
+    *(.rel.iplt)
+    PROVIDE (__rel_iplt_end = .);
+  }
+  .rela.plt       :
+  {
+    *(.rela.plt)
+    PROVIDE (__rela_iplt_start = .);
+    *(.rela.iplt)
+    PROVIDE (__rela_iplt_end = .);
+  }
+  .rela.tocbss   : { *(.rela.tocbss) }
   .init           :
   {
     KEEP (*(.init))
@@ -88,20 +93,15 @@ SECTIONS
   .sdata2         : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) }
   .sbss2          : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
   .eh_frame_hdr : { *(.eh_frame_hdr) }
-  .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) }
-  .gcc_except_table   : ONLY_IF_RO { KEEP (*(.gcc_except_table)) 
-(.gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to adjust up to
      the same address within the page on the next page up.  */
-  . = ALIGN (0x10000) - ((0x10000 - .) & (0x10000 - 1)); . = 
-ATA_SEGMENT_ALIGN (0x10000, 0x1000);
-  /* Exception handling  */
-  .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
-  .gcc_except_table   : ONLY_IF_RW { KEEP (*(.gcc_except_table)) 
-(.gcc_except_table.*) }
-  /* Thread Local Storage sections  */
-  .tdata         : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
-  .tbss                  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
+  . = ALIGN (0x10000) - ((0x10000 - .) & (0x10000 - 1)); . = DATA_SEGMENT_ALIGN
+(0x10000, 0x1000);   /* Exception handling  */
+  .eh_frame       : { KEEP (*(.eh_frame)) }
+  .gcc_except_table   : { KEEP (*(.gcc_except_table))
+*(.gcc_except_table.*) }   /* Thread Local Storage sections  */
+  .tdata         : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
+  .tbss                  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
   /* Ensure the __preinit_array_start label is properly aligned.  We
      could instead move the label definition inside the section, but
      the linker would then create the section even if it turns out to
@@ -154,9 +154,9 @@ ATA_SEGMENT_ALIGN (0x10000, 0x1000);
     SORT(CONSTRUCTORS)
   }
   .data1          : { *(.data1) }
-  .toc1                 ALIGN(8) : { *(.toc1) }
-  .opd          ALIGN(8) : { KEEP (*(.opd)) }
-  .got         ALIGN(8) : { *(.got .toc) }
+  .toc1                 ALIGN(8) : { *(.toc1) }
+  .opd          ALIGN(8) : { KEEP (*(.opd)) }
+  .got         ALIGN(8) : { *(.got .toc) }
   /* We want the small data sections together, so single-instruction offsets
      can access them all, and initialized data all before uninitialized, so
      we can shorten the on-disk segment size.  */
@@ -167,7 +167,7 @@ ATA_SEGMENT_ALIGN (0x10000, 0x1000);
   _edata = .;
   PROVIDE (edata = .);
   __bss_start = .;
-  .tocbss       ALIGN(8) : { *(.tocbss)}
+  .tocbss       ALIGN(8) : { *(.tocbss)}
   .sbss           :
   {
     PROVIDE (__sbss_start = .);