+ set flags "$flags -Ttext 0x1000"
+ }
+
+ if [istarget sh64*-*-elf] {
+ # This is what gcc passes to ld by default.
+ set flags "-mshelf32"
+ # SH64 targets cannot convert format in the linker
+ # using the -oformat command line switch.
+ setup_xfail "sh64*-*-*"
+ }
+
+ if {[istarget arm*-*-*] || \
+ [istarget strongarm*-*-*] || \
+ [istarget xscale*-*-*] || \
+ [istarget thumb-*-*] } {
+
+ # ARM targets call __gccmain
+ set flags "$flags --defsym __gccmain=0"
+
+ # ARM targets cannot convert format in the linker
+ # using the --oformat command line switch
+ setup_xfail "*arm*-*-*"
+ setup_xfail "xscale-*-*"
+ setup_xfail "thumb-*-*"
+ }
+
+ # PowerPC EABI code calls __eabi.
+ if [istarget powerpc*-*-eabi*] {
+ set flags "$flags --defsym __eabi=0"
+ }
+
+ # mn10200 code calls __truncsipsi2_d0_d2.
+ if {[istarget mn10200*-*-*]} then {
+ set flags "$flags --defsym __truncsipsi2_d0_d2=0"
+ }
+
+ # m6811/m6812 code has references to soft registers.
+ if {[istarget m6811-*-*] || [istarget m6812-*-*]} {
+ set flags "$flags --defsym _.frame=0 --defsym _.d1=0 --defsym _.d2=0"
+ set flags "$flags --defsym _.d3=0 --defsym _.d4=0"
+ set flags "$flags --defsym _.tmp=0 --defsym _.xy=0 --defsym _.z=0"
+ }
+
+ # V850 targets need libgcc.a
+ if [istarget v850*-*-elf] {
+ set objs "$objs -L ../gcc -lgcc"
+ }
+
+ # Xtensa ELF targets relax by default; S-Record linker does not
+ if [istarget xtensa*-*-*] {
+ set flags "$flags -no-relax"