aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-08-02 16:25:14 +0000
committerNick Clifton <nickc@redhat.com>2006-08-02 16:25:14 +0000
commit9d7cbccda0d0b223261e33efb609a7a43401ec5e (patch)
tree89c15bea23a6a33149b4057f5f7add8d6910cdb6 /gas
parentc973bc5cd4b6024ab430a41cae5b75c2c54fd55e (diff)
downloadgdb-9d7cbccda0d0b223261e33efb609a7a43401ec5e.zip
gdb-9d7cbccda0d0b223261e33efb609a7a43401ec5e.tar.gz
gdb-9d7cbccda0d0b223261e33efb609a7a43401ec5e.tar.bz2
PR binutils/2983
* bfd/elf64-x86-64.c: Add FreeBSD support. (elf64_x86_64_fbsd_post_process_headers): New function. * bfd/targets.c (_bfd_target_vector): Add bfd_elf64_x86_64_freebsd_vec. * bfd/config.bfd (x64_64-*-freebsd*): Add bfd_elf64_x86_64_freebsd_vec to the targ_selvecs. * bfd/configure.in: Add entry for bfd_elf64_x86_64_freebsd_vec. * bfd/configure: Regenerate. * gas/config/tc-i386.c (md_parse_option): Treat any target starting with elf64_x86_64 as a viable target for the -64 switch. (i386_target_format): For 64-bit ELF flavoured output use ELF_TARGET_FORMAT64. * gas/config/tc-i386.h (ELF_TARGET_FORMAT64): Define. * ld/emulparams/elf_x86_64_fbsd.sh (OUTPUT_FORMAT): Define as elf64-x86-64-freebsd.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog9
-rw-r--r--gas/config/tc-i386.c4
-rw-r--r--gas/config/tc-i386.h7
3 files changed, 17 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 937a60f..593d5f8 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,12 @@
+2006-08-02 Petr Salinger <Petr.Salinger@seznam.cz>
+
+ PR binutils/2983
+ * config/tc-i386.c (md_parse_option): Treat any target starting
+ with elf64_x86_64 as a viable target for the -64 switch.
+ (i386_target_format): For 64-bit ELF flavoured output use
+ ELF_TARGET_FORMAT64.
+ * config/tc-i386.h (ELF_TARGET_FORMAT64): Define.
+
2006-08-02 Nick Clifton <nickc@redhat.com>
PR gas/2991
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 1060510..f85aed3 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -5819,7 +5819,7 @@ md_parse_option (int c, char *arg)
list = bfd_target_list ();
for (l = list; *l != NULL; l++)
- if (strcmp (*l, "elf64-x86-64") == 0)
+ if (strncmp (*l, "elf64-x86-64", 12) == 0)
{
default_arch = "x86_64";
break;
@@ -5975,7 +5975,7 @@ i386_target_format ()
object_64bit = 1;
use_rela_relocations = 1;
}
- return flag_code == CODE_64BIT ? "elf64-x86-64" : ELF_TARGET_FORMAT;
+ return flag_code == CODE_64BIT ? ELF_TARGET_FORMAT64 : ELF_TARGET_FORMAT;
}
#endif
default:
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index 4519132..43d6df9 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -1,6 +1,6 @@
/* tc-i386.h -- Header file for tc-i386.c
Copyright 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005
+ 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -55,6 +55,7 @@ extern unsigned long i386_mach (void);
#ifdef TE_FreeBSD
#define ELF_TARGET_FORMAT "elf32-i386-freebsd"
+#define ELF_TARGET_FORMAT64 "elf64-x86-64-freebsd"
#elif defined (TE_VXWORKS)
#define ELF_TARGET_FORMAT "elf32-i386-vxworks"
#endif
@@ -63,6 +64,10 @@ extern unsigned long i386_mach (void);
#define ELF_TARGET_FORMAT "elf32-i386"
#endif
+#ifndef ELF_TARGET_FORMAT64
+#define ELF_TARGET_FORMAT64 "elf64-x86-64"
+#endif
+
#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \
|| defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF))
extern const char *i386_target_format PARAMS ((void));