ia64/xen-unstable

changeset 13947:7242b912d266

[XEN][POWERPC] Linker script simplification broke optimized builds.

offending changeset was: changeset: 14126:c759c733f77d
So put it back and just update the symbols like a good little boy.

Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Mon Jan 22 15:52:46 2007 -0500 (2007-01-22)
parents 796887cef9e1
children 3da9a56421c5
files xen/arch/powerpc/xen.lds.S
line diff
     1.1 --- a/xen/arch/powerpc/xen.lds.S	Wed Jan 17 14:12:08 2007 -0500
     1.2 +++ b/xen/arch/powerpc/xen.lds.S	Mon Jan 22 15:52:46 2007 -0500
     1.3 @@ -7,62 +7,113 @@ OUTPUT_FORMAT("elf64-powerpc", "elf64-po
     1.4  	      "elf64-powerpc")
     1.5  OUTPUT_ARCH(powerpc:common64)
     1.6  ENTRY(_start)
     1.7 +SEARCH_DIR("=/usr/local/lib64"); SEARCH_DIR("=/lib64"); SEARCH_DIR("=/usr/lib64"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
     1.8 +/* Do we need any of these for elf?
     1.9 +   __DYNAMIC = 0;    */
    1.10  PHDRS
    1.11  {
    1.12    text PT_LOAD;
    1.13  }   
    1.14  SECTIONS
    1.15  {
    1.16 -  /* This is the address that we are linking at */  	
    1.17    . = 0x00400000;
    1.18    PROVIDE(_text = .);
    1.19    PROVIDE(_stext = .);
    1.20    /* Read-only sections, merged into text segment: */
    1.21 +  .interp         : { *(.interp) } :text
    1.22 +  .hash           : { *(.hash) }
    1.23 +  .dynsym         : { *(.dynsym) }
    1.24 +  .dynstr         : { *(.dynstr) }
    1.25 +  .gnu.version    : { *(.gnu.version) }
    1.26 +  .gnu.version_d  : { *(.gnu.version_d) }
    1.27 +  .gnu.version_r  : { *(.gnu.version_r) }
    1.28 +  .rel.dyn        :
    1.29 +    {
    1.30 +      *(.rel.init)
    1.31 +      *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
    1.32 +      *(.rel.fini)
    1.33 +      *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
    1.34 +      *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
    1.35 +      *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
    1.36 +      *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
    1.37 +      *(.rel.ctors)
    1.38 +      *(.rel.dtors)
    1.39 +      *(.rel.got)
    1.40 +      *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
    1.41 +      *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
    1.42 +      *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
    1.43 +      *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
    1.44 +      *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
    1.45 +    }
    1.46 +  .rela.dyn       :
    1.47 +    {
    1.48 +      *(.rela.init)
    1.49 +      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
    1.50 +      *(.rela.fini)
    1.51 +      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
    1.52 +      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
    1.53 +      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
    1.54 +      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
    1.55 +      *(.rela.ctors)
    1.56 +      *(.rela.dtors)
    1.57 +      *(.rela.got)
    1.58 +      *(.rela.toc)
    1.59 +      *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
    1.60 +      *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
    1.61 +      *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
    1.62 +      *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
    1.63 +      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
    1.64 +    }
    1.65 +  .rel.plt        : { *(.rel.plt) }
    1.66 +  .rela.plt       : { *(.rela.plt) }
    1.67 +  .rela.tocbss	  : { *(.rela.tocbss) }
    1.68 +  .init           :
    1.69 +  {
    1.70 +    KEEP (*(.init))
    1.71 +  } =0x60000000
    1.72    .text           :
    1.73    {
    1.74 -    *(.text)
    1.75 +    *(.text .stub .text.* .gnu.linkonce.t.*)
    1.76      /* .gnu.warning sections are handled specially by elf32.em.  */
    1.77      *(.gnu.warning)
    1.78 -  } : text
    1.79 -  /* end of text */
    1.80 +    *(.sfpr .glink)
    1.81 +  } =0x60000000
    1.82 +  .fini           :
    1.83 +  {
    1.84 +    KEEP (*(.fini))
    1.85 +  } =0x60000000
    1.86    PROVIDE (__etext = .);
    1.87    PROVIDE (_etext = .);
    1.88    PROVIDE (etext = .);
    1.89 -
    1.90 -  /* read only data */
    1.91 -  .rodata         : { *(.rodata .rodata.*) } : text
    1.92 -  .rodata1        : { *(.rodata1) } : text
    1.93 -  .sdata2         : { *(.sdata2 .sdata2.*) } : text
    1.94 -  .sbss2          : { *(.sbss2 .sbss2.*) } : text
    1.95 -
    1.96 -  . = ALIGN(64);
    1.97 -  __start___ex_table = .;
    1.98 -  __ex_table : { *(__ex_table) } : text
    1.99 -  __stop___ex_table = .;
   1.100 -  . = ALIGN(64);
   1.101 -
   1.102 +  .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
   1.103 +  .rodata1        : { *(.rodata1) }
   1.104 +  .sdata2         : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) }
   1.105 +  .sbss2          : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
   1.106 +  .eh_frame_hdr : { *(.eh_frame_hdr) }
   1.107 +  /* Adjust the address for the data segment.  We want to adjust up to
   1.108 +     the same address within the page on the next page up.  */
   1.109 +  . = ALIGN (0x10000) - ((0x10000 - .) & (0x10000 - 1)); . = DATA_SEGMENT_ALIGN (0x10000, 0x1000);
   1.110 +  /* Ensure the __preinit_array_start label is properly aligned.  We
   1.111 +     could instead move the label definition inside the section, but
   1.112 +     the linker would then create the section even if it turns out to
   1.113 +     be empty, which isn't pretty.  */
   1.114 +  . = ALIGN(64 / 8);
   1.115 +  PROVIDE (__preinit_array_start = .);
   1.116 +  .preinit_array     : { *(.preinit_array) }
   1.117 +  PROVIDE (__preinit_array_end = .);
   1.118 +  PROVIDE (__init_array_start = .);
   1.119 +  .init_array     : { *(.init_array) }
   1.120 +  PROVIDE (__init_array_end = .);
   1.121 +  PROVIDE (__fini_array_start = .);
   1.122 +  .fini_array     : { *(.fini_array) }
   1.123 +  PROVIDE (__fini_array_end = .);
   1.124    .data           :
   1.125    {
   1.126      *(.data .gnu.linkonce.d.*)
   1.127      SORT(CONSTRUCTORS)
   1.128 -  } : text
   1.129 -  .data1          : { *(.data1) } : text
   1.130 -  .tdata	  : { *(.tdata .tdata.* .gnu.linkonce.td.*) } : text
   1.131 -  .tbss		  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } : text
   1.132 -  .toc1		 ALIGN(8) : { *(.toc1) } : text
   1.133 -  .opd		 ALIGN(8) : { KEEP (*(.opd)) } : text
   1.134 -  .got		ALIGN(8) : { *(.got .toc) } : text
   1.135 -  /* We want the small data sections together, so single-instruction offsets
   1.136 -     can access them all, and initialized data all before uninitialized, so
   1.137 -     we can shorten the on-disk segment size.  */
   1.138 -  .sdata          :
   1.139 -  {
   1.140 -    *(.sdata .sdata.* .gnu.linkonce.s.*)
   1.141 -  } : text
   1.142 -  _edata = .;
   1.143 -  PROVIDE (edata = .);
   1.144 +  }
   1.145  
   1.146 -  . = ALIGN(4096);		/* Init code and data */
   1.147 +  . = ALIGN(4096);
   1.148    __init_begin = .;
   1.149    _sinittext = .;
   1.150    .init.text : { *(.init.text) } : text
   1.151 @@ -83,36 +134,85 @@ SECTIONS
   1.152    __init_end = .;
   1.153  	
   1.154    __per_cpu_start = .;
   1.155 -  .data.percpu : { *(.data.percpu) } :text
   1.156 +  .data.percpu : { *(.data.percpu) }
   1.157    __per_cpu_data_end = .;
   1.158    . = __per_cpu_start + (NR_CPUS << PERCPU_SHIFT);
   1.159    . = ALIGN(STACK_SIZE);
   1.160    __per_cpu_end = .;
   1.161 -	
   1.162 +
   1.163 +  .data1          : { *(.data1) }
   1.164 +  .tdata	  : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
   1.165 +  .tbss		  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
   1.166 +  .eh_frame       : { KEEP (*(.eh_frame)) }
   1.167 +  .gcc_except_table   : { *(.gcc_except_table) }
   1.168 +  .toc1		 ALIGN(8) : { *(.toc1) }
   1.169 +  .opd		 ALIGN(8) : { KEEP (*(.opd)) }
   1.170 +  .dynamic        : { *(.dynamic) }
   1.171 +  .ctors          :
   1.172 +  {
   1.173 +    /* gcc uses crtbegin.o to find the start of
   1.174 +       the constructors, so we make sure it is
   1.175 +       first.  Because this is a wildcard, it
   1.176 +       doesn't matter if the user does not
   1.177 +       actually link against crtbegin.o; the
   1.178 +       linker won't look for a file to match a
   1.179 +       wildcard.  The wildcard also means that it
   1.180 +       doesn't matter which directory crtbegin.o
   1.181 +       is in.  */
   1.182 +    KEEP (*crtbegin*.o(.ctors))
   1.183 +    /* We don't want to include the .ctor section from
   1.184 +       from the crtend.o file until after the sorted ctors.
   1.185 +       The .ctor section from the crtend file contains the
   1.186 +       end of ctors marker and it must be last */
   1.187 +    KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
   1.188 +    KEEP (*(SORT(.ctors.*)))
   1.189 +    KEEP (*(.ctors))
   1.190 +  }
   1.191 +  .dtors          :
   1.192 +  {
   1.193 +    KEEP (*crtbegin*.o(.dtors))
   1.194 +    KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
   1.195 +    KEEP (*(SORT(.dtors.*)))
   1.196 +    KEEP (*(.dtors))
   1.197 +  }
   1.198 +  .jcr            : { KEEP (*(.jcr)) }
   1.199 +  .got		ALIGN(8) : { *(.got .toc) }
   1.200 +  /* We want the small data sections together, so single-instruction offsets
   1.201 +     can access them all, and initialized data all before uninitialized, so
   1.202 +     we can shorten the on-disk segment size.  */
   1.203 +  .sdata          :
   1.204 +  {
   1.205 +    *(.sdata .sdata.* .gnu.linkonce.s.*)
   1.206 +  }
   1.207 +  _edata = .;
   1.208 +  PROVIDE (edata = .);
   1.209    __bss_start = .;
   1.210 -  .tocbss	 ALIGN(8) : { *(.tocbss) } : text
   1.211 +  .tocbss	 ALIGN(8) : { *(.tocbss)}
   1.212    .sbss           :
   1.213    {
   1.214      PROVIDE (__sbss_start = .);
   1.215      PROVIDE (___sbss_start = .);
   1.216 +    *(.dynsbss)
   1.217      *(.sbss .sbss.* .gnu.linkonce.sb.*)
   1.218      *(.scommon)
   1.219      PROVIDE (__sbss_end = .);
   1.220      PROVIDE (___sbss_end = .);
   1.221 -  } : text
   1.222 +  }
   1.223 +  .plt            : { *(.plt) }
   1.224    .bss            :
   1.225    {
   1.226 +   *(.dynbss)
   1.227     *(.bss .bss.* .gnu.linkonce.b.*)
   1.228     *(COMMON)
   1.229     /* Align here to ensure that the .bss section occupies space up to
   1.230        _end.  Align after .bss to ensure correct alignment even if the
   1.231        .bss section disappears because there are no input sections.  */
   1.232     . = ALIGN(64 / 8);
   1.233 -  } : text
   1.234 +  }
   1.235    . = ALIGN(64 / 8);
   1.236    _end = .;
   1.237    PROVIDE (end = .);
   1.238 -
   1.239 +  . = DATA_SEGMENT_END (.);
   1.240    /* Stabs debugging sections.  */
   1.241    .stab          0 : { *(.stab) }
   1.242    .stabstr       0 : { *(.stabstr) }