diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-05-11 12:01:57 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-05-11 12:06:33 -0700 |
commit | 5197d474361b4748e0339ae60e6dc9975f2313df (patch) | |
tree | a86f19e173d2f1b4d1af9d6d6aff8bd624a53352 /gas/config | |
parent | 7e0a81123db953de03f6482f7c10f306407d348e (diff) | |
download | gdb-5197d474361b4748e0339ae60e6dc9975f2313df.zip gdb-5197d474361b4748e0339ae60e6dc9975f2313df.tar.gz gdb-5197d474361b4748e0339ae60e6dc9975f2313df.tar.bz2 |
Default e_machine to EM_IAMCU for i?86-*-elfiamcu
This patch sets the default ELF output format of assembler and linker to
EM_IAMCU when binutils is configured to i?86-*-elfiamcu target.
gas/
* configure.tgt (arch): Set to iamcu for i386-*-elfiamcu target.
* config/tc-i386.c (i386_mach): Support iamcu.
(i386_target_format): Likewise.
ld/
* configure.tgt: Support i[3-7]86-*-elfiamcu target.
ld/testsuite/
* ld-i386/i386.exp (iamcu_tests): Run iamcu-4.
* ld-i386/iamcu-4.d: New file.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-i386.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 8a6da64..db263ee 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -2468,7 +2468,8 @@ i386_mach (void) else return bfd_mach_x64_32; } - else if (!strcmp (default_arch, "i386")) + else if (!strcmp (default_arch, "i386") + || !strcmp (default_arch, "iamcu")) { if (cpu_arch_isa == PROCESSOR_IAMCU) { @@ -10071,6 +10072,27 @@ i386_target_format (void) } else if (!strcmp (default_arch, "i386")) update_code_flag (CODE_32BIT, 1); + else if (!strcmp (default_arch, "iamcu")) + { + update_code_flag (CODE_32BIT, 1); + if (cpu_arch_isa == PROCESSOR_UNKNOWN) + { + static const i386_cpu_flags iamcu_flags = CPU_IAMCU_FLAGS; + cpu_arch_name = "iamcu"; + cpu_sub_arch_name = NULL; + cpu_arch_flags = iamcu_flags; + cpu_arch_isa = PROCESSOR_IAMCU; + cpu_arch_isa_flags = iamcu_flags; + if (!cpu_arch_tune_set) + { + cpu_arch_tune = cpu_arch_isa; + cpu_arch_tune_flags = cpu_arch_isa_flags; + } + } + else + as_fatal (_("Intel MCU doesn't support `%s' architecture"), + cpu_arch_name); + } else as_fatal (_("unknown architecture")); |