From 731608473ad5f49c490c51ced17213db5ffddcef Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 5 May 2006 17:46:47 +0000 Subject: * gas/config/tc-avr.h (TC_VALIDATE_FIX): Define. Disable fixups for PMEM related expressions. * bfd/elf32-avr.c (elf32_avr_relax_delete_bytes): Iterate over all of the bfd's sections for the reloc-addend adjustments. --- gas/ChangeLog | 5 +++++ gas/config/tc-avr.h | 21 +++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index 82de3cc..ab362dd 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2006-05-05 Bjoern Haase + + * gas/config/tc-avr.h (TC_VALIDATE_FIX): Define. Disable fixups + for PMEM related expressions. + 2006-05-05 Nick Clifton PR gas/2582 diff --git a/gas/config/tc-avr.h b/gas/config/tc-avr.h index df12045..61e76e6 100644 --- a/gas/config/tc-avr.h +++ b/gas/config/tc-avr.h @@ -1,5 +1,5 @@ /* This file is tc-avr.h - Copyright 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc. + Copyright 1999, 2000, 2001, 2002, 2005, 2006 Free Software Foundation, Inc. Contributed by Denis Chertykov @@ -109,7 +109,7 @@ extern long md_pcrel_from_section (struct fix *, segT); would print `12 34 56 78'. The default value is 4. */ #define LISTING_WORD_SIZE 2 -/* AVR port uses `$' as a logical line separator */ +/* AVR port uses `$' as a logical line separator. */ #define LEX_DOLLAR 0 /* An `.lcomm' directive with no explicit alignment parameter will @@ -120,3 +120,20 @@ extern long md_pcrel_from_section (struct fix *, segT); also affected by this macro. The default definition will set P2VAR to the truncated power of two of sizes up to eight bytes. */ #define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) (P2VAR) = 0 + +/* We don't want gas to fixup the following program memory related relocations. + We will need them in case that we want to do linker relaxation. + We could in principle keep these fixups in gas when not relaxing. + However, there is no serious performance penilty when making the linker + make the fixup work. */ +#define TC_VALIDATE_FIX(FIXP,SEG,SKIP) \ + if ( FIXP->fx_r_type == BFD_RELOC_AVR_7_PCREL \ + || FIXP->fx_r_type == BFD_RELOC_AVR_13_PCREL \ + || FIXP->fx_r_type == BFD_RELOC_AVR_LO8_LDI_PM \ + || FIXP->fx_r_type == BFD_RELOC_AVR_HI8_LDI_PM \ + || FIXP->fx_r_type == BFD_RELOC_AVR_HH8_LDI_PM \ + || FIXP->fx_r_type == BFD_RELOC_AVR_16_PM) \ + { \ + goto SKIP; \ + } + -- cgit v1.1