2009-11-04 Daniel Jacobowitz <dan@codesourcery.com>

Maxim Kuvyrkov  <maxim@codesourcery.com>

	* config/tc-m68k.h (CF_DIFF_EXPR_OK): Define to 0 for uClinux.
	(CFI_DIFF_LSDA_OK): Define.
	* config/te-uclinux.h: New file.
	* configure.tgt (m68k-uclinux): Define em.
	* dw2gencfi.c (CFI_DIFF_LSDA_OK): New macro.
	(dot_cfi_lsda, output_fde): Use instead of CFI_DIFF_EXPR_OK.
This commit is contained in:
Maxim Kuvyrkov 2009-11-04 09:52:00 +00:00
parent d51b88d344
commit 2c678708e6
5 changed files with 53 additions and 3 deletions

View File

@ -1,3 +1,13 @@
2009-11-04 Daniel Jacobowitz <dan@codesourcery.com>
Maxim Kuvyrkov <maxim@codesourcery.com>
* config/tc-m68k.h (CF_DIFF_EXPR_OK): Define to 0 for uClinux.
(CFI_DIFF_LSDA_OK): Define.
* config/te-uclinux.h: New file.
* configure.tgt (m68k-uclinux): Define em.
* dw2gencfi.c (CFI_DIFF_LSDA_OK): New macro.
(dot_cfi_lsda, output_fde): Use instead of CFI_DIFF_EXPR_OK.
2009-11-03 Paul Brook <paul@codesourcery.com>
* config/tc-arm.c (do_vfp_nsyn_mla_mls): Fix vmls excoding.

View File

@ -178,3 +178,13 @@ extern int tc_m68k_regname_to_dw2regnum (char *regname);
#define tc_cfi_frame_initial_instructions tc_m68k_frame_initial_instructions
extern void tc_m68k_frame_initial_instructions (void);
#ifdef TE_UCLINUX
/* elf2flt does not honor PT_LOAD's from the executable.
.text and .eh_frame sections will not end up in the same segment and so
we cannot use PC-relative encoding for CFI. */
# define CFI_DIFF_EXPR_OK 0
/* However, follow compiler's guidance when it specifies encoding for LSDA. */
# define CFI_DIFF_LSDA_OK 1
#endif

22
gas/config/te-uclinux.h Normal file
View File

@ -0,0 +1,22 @@
/* Copyright 2009 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
GAS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 3,
or (at your option) any later version.
GAS is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to the Free
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
#define TE_UCLINUX
#include "te-generic.h"

View File

@ -267,7 +267,7 @@ case ${generic_target} in
m68k-*-sysv4*) fmt=elf em=svr4 ;;
m68k-*-rtems*) fmt=elf ;;
m68k-*-linux-*) fmt=elf em=linux ;;
m68k-*-uclinux*) fmt=elf ;;
m68k-*-uclinux*) fmt=elf em=uclinux ;;
m68k-*-gnu*) fmt=elf ;;
m68k-*-netbsdelf*) fmt=elf em=nbsd ;;
m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;;

View File

@ -36,6 +36,14 @@
# endif
#endif
#ifndef CFI_DIFF_LSDA_OK
# define CFI_DIFF_LSDA_OK CFI_DIFF_EXPR_OK
#endif
#if CFI_DIFF_EXPR_OK == 1 && CFI_DIFF_LSDA_OK == 0
# error "CFI_DIFF_EXPR_OK should imply CFI_DIFF_LSDA_OK"
#endif
/* We re-use DWARF2_LINE_MIN_INSN_LENGTH for the code alignment field
of the CIE. Default to 1 if not otherwise specified. */
#ifndef DWARF2_LINE_MIN_INSN_LENGTH
@ -758,7 +766,7 @@ dot_cfi_lsda (int ignored ATTRIBUTE_UNUSED)
if ((encoding & 0xff) != encoding
|| ((encoding & 0x70) != 0
#if CFI_DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
#if CFI_DIFF_LSDA_OK || defined tc_cfi_emit_pcrel_expr
&& (encoding & 0x70) != DW_EH_PE_pcrel
#endif
)
@ -1445,7 +1453,7 @@ output_fde (struct fde_entry *fde, struct cie_entry *cie,
exp = fde->lsda;
if ((fde->lsda_encoding & 0x70) == DW_EH_PE_pcrel)
{
#if CFI_DIFF_EXPR_OK
#if CFI_DIFF_LSDA_OK
exp.X_op = O_subtract;
exp.X_op_symbol = symbol_temp_new_now ();
emit_expr (&exp, augmentation_size);