Mercurial > hg > index.cgi
comparison extra/ld @ 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 | 82957c407577 |
children | a3711f5ac569 |
comparison
equal
deleted
inserted
replaced
394:fc166b3bbae3 | 395:26d2791672b1 |
---|---|
41 # options="-b .text=0x2000 -b .data=0x7000 -b .bss=0x7C00 -b .ctors=0x7F00 -b .dtors=0x7F80 -b vector=0x7FF0" | 41 # options="-b .text=0x2000 -b .data=0x7000 -b .bss=0x7C00 -b .ctors=0x7F00 -b .dtors=0x7F80 -b vector=0x7FF0" |
42 # aslink_options="-nwxst" | 42 # aslink_options="-nwxst" |
43 # exe_suffix=.bin | 43 # exe_suffix=.bin |
44 ;; | 44 ;; |
45 *) | 45 *) |
46 options="--format=decb" | 46 options="--format=raw" |
47 # options="-b .text=0x8000 -b .data=0x1000 -b .bss=0x0100 -b .ctors=0xFD00 -b .dtors=0xFE00 -b vector=0xFFF0" | 47 # options="-b .text=0x8000 -b .data=0x1000 -b .bss=0x0100 -b .ctors=0xFD00 -b .dtors=0xFE00 -b vector=0xFFF0" |
48 # aslink_options="-nwxso" | 48 # aslink_options="-nwxso" |
49 # exe_suffix=.s19 | 49 # exe_suffix=.s19 |
50 ;; | 50 ;; |
51 esac | 51 esac |
85 --section-start) | 85 --section-start) |
86 section_value=$1; shift | 86 section_value=$1; shift |
87 options="$options --section-base=$section_value" | 87 options="$options --section-base=$section_value" |
88 ;; | 88 ;; |
89 | 89 |
90 --map) | 90 -Map=*) |
91 map_file=$1; shift | 91 arg=${arg#-Map=}; shift |
92 options="$options --map=$map_file" | 92 options="$options --map=$arg" |
93 ;; | 93 ;; |
94 | 94 |
95 --script=*) | |
96 options="$options $arg" | |
97 ;; | |
98 -T) | |
99 options="$options --script=$1"; shift | |
100 ;; | |
95 -Tbss) | 101 -Tbss) |
96 options="$options --section-base=.bss=$1"; shift | 102 options="$options --section-base=.bss=$1"; shift |
97 ;; | 103 ;; |
98 -Tdata) | 104 -Tdata) |
99 options="$options --section-base=.data=$1"; shift | 105 options="$options --section-base=.data=$1"; shift |
107 *crt0.o) | 113 *crt0.o) |
108 startup_files=$arg | 114 startup_files=$arg |
109 ;; | 115 ;; |
110 -g) | 116 -g) |
111 # Ignored by GNU ld; we should do the same | 117 # Ignored by GNU ld; we should do the same |
112 true | |
113 ;; | 118 ;; |
114 -h|--help) | 119 -h|--help) |
115 echo "ld (m6809)" | 120 echo "ld (m6809)" |
116 exit 0 | 121 exit 0 |
117 ;; | |
118 -T) | |
119 echo "-T scripts not supported"; | |
120 exit 1; | |
121 ;; | 122 ;; |
122 --format-lwex) | 123 --format-lwex) |
123 options="$options --format=lwex" | 124 options="$options --format=lwex" |
124 ;; | 125 ;; |
125 | 126 |
138 | 139 |
139 --entry) | 140 --entry) |
140 options="$options $arg" | 141 options="$options $arg" |
141 ;; | 142 ;; |
142 | 143 |
144 --relax) | |
145 ;; | |
146 --start-group) | |
147 ;; | |
148 --end-group) | |
149 ;; | |
150 --gc-sections) | |
151 ;; | |
143 -*) | 152 -*) |
144 echo "ld (m6809): unknown option $arg" | 153 echo "ld (m6809): unknown option $arg" |
145 exit 1 | 154 exit 1 |
146 ;; | 155 ;; |
147 *) | 156 *) |