changeset 395:26d2791672b1

Update the "ld" wrapper Thanks to Tormod Volden <lists.tormod@gmail.com> for these updates to the "ld" wrapper for using lwtools with gcc6809. In theory the changes shouldn't cause any problems.
author William Astle <lost@l-w.ca>
date Mon, 20 Jul 2015 17:48:51 -0600
parents fc166b3bbae3
children d0c0fede5021
files extra/ld
diffstat 1 files changed, 18 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/extra/ld	Wed Jul 15 19:54:57 2015 -0600
+++ b/extra/ld	Mon Jul 20 17:48:51 2015 -0600
@@ -43,7 +43,7 @@
 #		exe_suffix=.bin
 		;;
 	*)
-		options="--format=decb"
+		options="--format=raw"
 #		options="-b .text=0x8000 -b .data=0x1000 -b .bss=0x0100 -b .ctors=0xFD00 -b .dtors=0xFE00 -b vector=0xFFF0"
 #		aslink_options="-nwxso"
 #		exe_suffix=.s19
@@ -87,11 +87,17 @@
 			options="$options --section-base=$section_value"
 			;;
 		
-		--map)
-			map_file=$1; shift
-			options="$options --map=$map_file"
+		-Map=*)
+			arg=${arg#-Map=}; shift
+			options="$options --map=$arg"
 			;;
 			
+		--script=*)
+			options="$options $arg"
+			;;
+		-T)
+			options="$options --script=$1"; shift
+			;;
 		-Tbss)
 			options="$options --section-base=.bss=$1"; shift
 			;;
@@ -109,16 +115,11 @@
 			;;
 		-g)
 			# Ignored by GNU ld; we should do the same
-			true
 			;;
 		-h|--help)
 			echo "ld (m6809)"
 			exit 0
 			;;
-		-T)
-			echo "-T scripts not supported";
-			exit 1;
-			;;
 		--format-lwex)
 			options="$options --format=lwex"
 			;;
@@ -140,6 +141,14 @@
 			options="$options $arg"
 			;;
 
+		--relax)
+			;;
+		--start-group)
+			;;
+		--end-group)
+			;;
+		--gc-sections)
+			;;
 		-*)
 			echo "ld (m6809): unknown option $arg"
 			exit 1