This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

elfppc.sc removal



I just found another bug relating to a elf.sc/elfppc.sc mismatch, this
one related to exceptions.  So I'm fixing it once and for all.

This patch is the first of two to remove elfppc.sc; this is the
changes to the generic stuff.  Any comment?  OK to commit?

-- 
- Geoffrey Keating <geoffk@cygnus.com>

===File /home/geoffk/patches/cygnus/rs6000-crtS-elfsc.patch===
2000-04-06  Geoff Keating  <geoffk@cygnus.com>

	* scripttempl/elf.sc: Add support for .sbss2 and .sdata2 sections.
	Add new BSS_PLT variable for when .plt need not be contained in
	the file.  Move _etext so that it is also after .fini, and provide
	both etext and _etext with a leading underscore.  Mark the start
	and end of .sbss.

Index: ld/scripttempl/elf.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elf.sc,v
retrieving revision 1.9
diff -p -u -u -p -r1.9 elf.sc
--- elf.sc	2000/02/16 19:07:43	1.9
+++ elf.sc	2000/04/06 23:53:22
@@ -21,6 +21,7 @@
 #	OTHER_BSS_SYMBOLS - symbols that appear at the start of the
 #		.bss section besides __bss_start.
 #	DATA_PLT - .plt should be in data segment, not text segment.
+#	BSS_PLT - .plt should be in bss segment
 #	TEXT_DYNAMIC - .dynamic in text segment, not data segment.
 #	EMBEDDED - whether this is for an embedded system. 
 #	SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
@@ -47,6 +48,8 @@ INTERP=".interp   ${RELOCATING-0} : { *(
 PLT=".plt    ${RELOCATING-0} : { *(.plt)	}"
 DYNAMIC=".dynamic     ${RELOCATING-0} : { *(.dynamic) }"
 RODATA=".rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r*)} }"
+SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2) }"
+SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2) }"
 CTOR=".ctors ${CONSTRUCTING-0} : 
   {
     ${CONSTRUCTING+${CTOR_START}}
@@ -183,6 +186,10 @@ SECTIONS
     }
   .rel.sbss    ${RELOCATING-0} : { *(.rel.sbss)		}
   .rela.sbss   ${RELOCATING-0} : { *(.rela.sbss)	}
+  .rel.sdata2  ${RELOCATING-0} : { *(.rel.sdata2)	}
+  .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2)	}
+  .rel.sbss2   ${RELOCATING-0} : { *(.rel.sbss2)	}
+  .rela.sbss2  ${RELOCATING-0} : { *(.rela.sbss2)	}
   .rel.bss     ${RELOCATING-0} : { *(.rel.bss)		}
   .rela.bss    ${RELOCATING-0} : { *(.rela.bss)		}
   .rel.plt     ${RELOCATING-0} : { *(.rel.plt)		}
@@ -196,7 +203,7 @@ SECTIONS
     ${INIT_END}
   } =${NOP-0}
 
-  ${DATA_PLT-${PLT}}
+  ${DATA_PLT-${BSS_PLT-${PLT}}}
   .text    ${RELOCATING-0} :
   {
     ${RELOCATING+${TEXT_START_SYMBOLS}}
@@ -208,16 +215,19 @@ SECTIONS
     ${RELOCATING+*(.gnu.linkonce.t*)}
     ${RELOCATING+${OTHER_TEXT_SECTIONS}}
   } =${NOP-0}
-  ${RELOCATING+_etext = .;}
-  ${RELOCATING+PROVIDE (etext = .);}
   .fini    ${RELOCATING-0} :
   {
     ${FINI_START}
     KEEP (*(.fini))
     ${FINI_END}
   } =${NOP-0}
+  ${RELOCATING+PROVIDE (__etext = .);}
+  ${RELOCATING+PROVIDE (_etext = .);}
+  ${RELOCATING+PROVIDE (etext = .);}
   ${WRITABLE_RODATA-${RODATA}}
   .rodata1 ${RELOCATING-0} : { *(.rodata1) }
+  ${CREATE_SHLIB-${SDATA2}}
+  ${CREATE_SHLIB-${SBSS2}}
   ${RELOCATING+${OTHER_READONLY_SECTIONS}}
 
   /* Adjust the address for the data segment.  We want to adjust up to
@@ -242,7 +252,9 @@ SECTIONS
   ${RELOCATING+${DTOR}}
   ${DATA_PLT+${PLT}}
   ${RELOCATING+${OTHER_GOT_SYMBOLS}}
-  .got         ${RELOCATING-0} : { *(.got.plt) *(.got) }
+  .got		${RELOCATING-0} : { *(.got.plt) *(.got) }
+  ${CREATE_SHLIB+${SDATA2}}
+  ${CREATE_SHLIB+${SBSS2}}
   ${TEXT_DYNAMIC-${DYNAMIC}}
   /* We want the small data sections together, so single-instruction offsets
      can access them all, and initialized data all before uninitialized, so
@@ -261,11 +273,16 @@ SECTIONS
   ${RELOCATING+${OTHER_BSS_SYMBOLS}}
   .sbss    ${RELOCATING-0} :
   {
+    ${RELOCATING+PROVIDE (__sbss_start = .);}
+    ${RELOCATING+PROVIDE (___sbss_start = .);}
     *(.dynsbss)
     *(.sbss)
     ${RELOCATING+*(.sbss.*)}
     *(.scommon)
+    ${RELOCATING+PROVIDE (__sbss_end = .);}
+    ${RELOCATING+PROVIDE (___sbss_end = .);}
   }
+  ${BSS_PLT+${PLT}}
   .bss     ${RELOCATING-0} :
   {
    *(.dynbss)
============================================================

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]