diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-10-18 23:58:52 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-10-18 23:58:52 +0000 |
commit | 71a75f6f15bcaf99d98bb50ddd57ec8e8d1bbc9d (patch) | |
tree | d011cc97e090b899771347dc709397573fd767de /gas | |
parent | 981c7f5a30140027e173d12ba33b8b650f850447 (diff) | |
download | gdb-71a75f6f15bcaf99d98bb50ddd57ec8e8d1bbc9d.zip gdb-71a75f6f15bcaf99d98bb50ddd57ec8e8d1bbc9d.tar.gz gdb-71a75f6f15bcaf99d98bb50ddd57ec8e8d1bbc9d.tar.bz2 |
2006-10-18 Roy Marples <uberlord@gentoo.org>
* bfd/elf64-sparc.c: Add FreeBSD support.
(elf64_sparc_fbsd_post_process_headers): New function.
* bfd/targets.c (_bfd_target_vector): Add bfd_elf64_sparc_freebsd_vec.
* bfd/config.bfd (sparc64-*-freebsd*): Set targ_defvec to bfd_elf64_sparc_freebsd_vec.
* bfd/configure.in: Add entry for bfd_elf64_sparc_freebsd_vec.
* bfd/configure: Regenerate.
* gas/config/tc-sparc.c (md_parse_option): Treat any target starting with elf32-sparc
as a viable target for the -32 switch and any target starting with elf64-sparc as a
viable target for the -64 switch.
(sparc_target_format): For 64-bit ELF flavoured output use ELF_TARGET_FORMAT64
while for 32-bit ELF flavoured output use ELF_TARGET_FORMAT.
* gas/config/tc-sparc.h (ELF_TARGET_FORMAT, ELF_TARGET_FORMAT64): Define.
* ld/emulparams/elf64_sparc_fbsd.sh (OUTPUT_FORMAT): Define as elf64-sparc-freebsd.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 9 | ||||
-rw-r--r-- | gas/config/tc-sparc.c | 6 | ||||
-rw-r--r-- | gas/config/tc-sparc.h | 13 |
3 files changed, 25 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 38b93fb..22262e3 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,12 @@ +2006-10-18 Roy Marples <uberlord@gentoo.org> + + * config/tc-sparc.c (md_parse_option): Treat any target starting with + elf32-sparc as a viable target for the -32 switch and any target starting with + elf64-sparc as a viable target for the -64 switch. + (sparc_target_format): For 64-bit ELF flavoured output use ELF_TARGET_FORMAT64 + while for 32-bit ELF flavoured output use ELF_TARGET_FORMAT. + * config/tc-sparc.h (ELF_TARGET_FORMAT, ELF_TARGET_FORMAT64): Define. + 2006-10-17 H.J. Lu <hongjiu.lu@intel.com> * configure: Regenerated. diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c index d84c273..d6a1a15 100644 --- a/gas/config/tc-sparc.c +++ b/gas/config/tc-sparc.c @@ -337,7 +337,7 @@ sparc_target_format () #endif #ifdef OBJ_ELF - return sparc_arch_size == 64 ? "elf64-sparc" : "elf32-sparc"; + return sparc_arch_size == 64 ? ELF64_TARGET_FORMAT : ELF_TARGET_FORMAT; #endif abort (); @@ -545,12 +545,12 @@ md_parse_option (c, arg) { if (sparc_arch_size == 32) { - if (strcmp (*l, "elf32-sparc") == 0) + if (CONST_STRNEQ (*l, "elf32-sparc")) break; } else { - if (strcmp (*l, "elf64-sparc") == 0) + if (CONST_STRNEQ (*l, "elf64-sparc")) break; } } diff --git a/gas/config/tc-sparc.h b/gas/config/tc-sparc.h index 3feac4f..3318ddd 100644 --- a/gas/config/tc-sparc.h +++ b/gas/config/tc-sparc.h @@ -31,6 +31,19 @@ struct frag; #define TARGET_ARCH bfd_arch_sparc +#ifdef TE_FreeBSD +#define ELF_TARGET_FORMAT "elf32-sparc-freebsd" +#define ELF64_TARGET_FORMAT "elf64-sparc-freebsd" +#endif + +#ifndef ELF_TARGET_FORMAT +#define ELF_TARGET_FORMAT "elf32-sparc" +#endif + +#ifndef ELF64_TARGET_FORMAT +#define ELF64_TARGET_FORMAT "elf64-sparc" +#endif + extern const char *sparc_target_format PARAMS ((void)); #define TARGET_FORMAT sparc_target_format () |