ld/
[deliverable/binutils-gdb.git] / ld / emulparams / elf32bmipn32-defs.sh
index 790eecf6f8de6d819a66c0da98b28e1d4b615b00..4c9834057be0c9896aae67f7384a483bbb2b1209 100644 (file)
@@ -11,6 +11,7 @@ BIG_OUTPUT_FORMAT="elf32-bigmips"
 LITTLE_OUTPUT_FORMAT="elf32-littlemips"
 
 TEMPLATE_NAME=elf32
+EXTRA_EM_FILE=mipself
 
 case "$EMULATION_NAME" in
 elf32*n32*) ELFSIZE=32 ;;
@@ -30,13 +31,19 @@ fi
 LIBPATH_SUFFIX=$ELFSIZE
 
 GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes
 
 TEXT_START_ADDR=0x10000000
-MAXPAGESIZE=0x100000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
 ENTRY=__start
 
 # GOT-related settings.  
+# If the output has a GOT section, there must be exactly 0x7ff0 bytes
+# between .got and _gp.  The ". = ." below stops the orphan code from
+# inserting other sections between the assignment to _gp and the start
+# of .got.
 OTHER_GOT_SYMBOLS='
+  . = .;
   _gp = ALIGN(16) + 0x7ff0;
 '
 OTHER_SDATA_SECTIONS="
@@ -50,28 +57,9 @@ TEXT_START_SYMBOLS='_ftext = . ;'
 DATA_START_SYMBOLS='_fdata = . ;'
 OTHER_BSS_SYMBOLS='_fbss = .;'
 
-OTHER_SECTIONS="
-  .MIPS.events.text ${RELOCATING-0} :
-    {
-       *(.MIPS.events.text${RELOCATING+ .MIPS.events.gnu.linkonce.t*})
-    }
-  .MIPS.content.text ${RELOCATING-0} : 
-    {
-       *(.MIPS.content.text${RELOCATING+ .MIPS.content.gnu.linkonce.t*})
-    }
-  .MIPS.events.data ${RELOCATING-0} :
-    {
-       *(.MIPS.events.data${RELOCATING+ .MIPS.events.gnu.linkonce.d*})
-    }
-  .MIPS.content.data ${RELOCATING-0} :
-    {
-       *(.MIPS.content.data${RELOCATING+ .MIPS.content.gnu.linkonce.d*})
-    }
-  .MIPS.events.rodata ${RELOCATING-0} :
-    {
-       *(.MIPS.events.rodata${RELOCATING+ .MIPS.events.gnu.linkonce.r*})
-    }
-  .MIPS.content.rodata ${RELOCATING-0} :
-    {
-       *(.MIPS.content.rodata${RELOCATING+ .MIPS.content.gnu.linkonce.r*})
-    }"
+INITIAL_READONLY_SECTIONS=".MIPS.options : { *(.MIPS.options) }"
+# Discard any .MIPS.content* or .MIPS.events* sections.  The linker
+# doesn't know how to adjust them.
+OTHER_SECTIONS="/DISCARD/ : { *(.MIPS.content*) *(.MIPS.events*) }"
+
+TEXT_DYNAMIC=
This page took 0.025292 seconds and 4 git commands to generate.