summaryrefslogtreecommitdiffstats
path: root/toolchain/elf2flt/elf2flt.nios2.conditional
blob: ca99cb3a1399d36a0e47a3d0c43f2b841ccc76b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--- elf2flt/elf2flt.ld
+++ elf2flt/elf2flt.ld
@@ -62,6 +62,10 @@
 		*(.eh_frame)
 		*(.gcc_except_table)
 
+		/* nios2 need gp */
+		_gp = ABSOLUTE(ALIGN(16) + 0x7ff0);
+		PROVIDE(gp = _gp);
+
 		/* Microblaze has .sdata and .sbss (small bss).  They must
 		   be contiguous, so please don't move any of this. JW */
 		_ssrw = . ;			
@@ -72,7 +72,7 @@
 		_ssrw = . ;			
 		*(.sdata) 
 		*(.sdata.*)
-		*(.sbss)			/* Don't move this! */
+		*(.sbss .gnu.linkonce.sb*)		/* Don't move this! */
 		_essrw = . ;
 
 		_ssrw_size = _essrw - _ssrw;
--- elf2flt/ld-elf2flt.in
+++ elf2flt/ld-elf2flt.in
@@ -132,7 +132,7 @@
 			esac
 			ARG1="$ARG1 -defsym $GOT_OFFSET=`expr ${SHARED_ID} '*' -4 - 4`"
 		fi
-		if [ "@emit_relocs@" = "yes" ]
+		if [ "no" = "yes" ]
 		then
 			SEDOP="$SEDOP -e s/^SINGLE_LINK://"
 		else
@@ -155,7 +155,7 @@
 			LDSCRIPT="$NEWLDSCRIPT"
 		fi
 
-		if [ "@emit_relocs@" = "yes" ]
+		if [ "no" = "yes" ]
 		then
 		 $LINKER $EMUL $SDIRS -T $LDSCRIPT -q -o "$OFILE.gdb" $ARG1             ||exit $?
 		 RFILE="$OFILE.gdb"