Index: tc-avr.h =================================================================== RCS file: /cvs/src/src/gas/config/tc-avr.h,v retrieving revision 1.11 diff -u -r1.11 tc-avr.h --- tc-avr.h 12 Oct 2005 10:56:46 -0000 1.11 +++ tc-avr.h 28 Feb 2006 13:46:24 -0000 @@ -59,7 +59,7 @@ /* You may define this macro to generate a fixup for a data allocation pseudo-op. */ #define TC_CONS_FIX_NEW(FRAG,WHERE,N,EXP) avr_cons_fix_new (FRAG, WHERE, N, EXP) -extern void avr_cons_fix_new (fragS *,int, int, expressionS *); +extern void avr_cons_fix_new (fragS *, int, int, expressionS *); /* This should just call either `number_to_chars_bigendian' or `number_to_chars_littleendian', whichever is appropriate. On @@ -120,3 +120,27 @@ 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 + +/* Fixup debug sections since we will never relax them. */ +#define TC_LINKRELAX_FIXUP(seg) (seg->flags & SEC_ALLOC) + +/* 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; \ + } + +/* We do not want to adjust BFD_RELOC_AVR_16_PM). Otherwise we would + have trouble with relaxation and initialized tables in .data . */ +#define tc_fix_adjustable(FIXP) \ + (FIXP->fx_r_type != BFD_RELOC_AVR_16_PM)