This is the mail archive of the
mailing list for the binutils project.
[RFC,Patch,AVR]: ad PR13503: Add new relocs to TC_VALIDATE_FIX?
- From: Georg-Johann Lay <avr at gjlay dot de>
- To: binutils at sourceware dot org
- Cc: Eric Weddington <eric dot weddington at atmel dot com>, Denis Chertykov <chertykov at gmail dot com>
- Date: Wed, 15 Aug 2012 08:38:09 +0200
- Subject: [RFC,Patch,AVR]: ad PR13503: Add new relocs to TC_VALIDATE_FIX?
Hi, in gas/config/tc-avr.h there is the following comment
/* We don't want gas to fixup the following program memory related
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. Check also that fx_addsy is not NULL, in order
sure that the fixup refers to some sort of lable. */
PR13503 introduced new relocs that are not mentioned in TC_VALIDATE_FIX.
The attached patch adds the new BFD_RELOC_AVR_8_LO, BFD_RELOC_AVR_8_HI,
BFD_RELOC_AVR_8_HLO to that exclude list.
I cannot say if these new relocs need to be handled there, if the must
be handled there or must *not* be handled there. I just noticed that
the new relocs are missing there, but no clue if that's good or bad or
simply does not matter...
Thus please review this patch. And in the case it is actually needed,
please apply it.
* config/tc-avr.h (TC_VALIDATE_FIX): Skip: BFD_RELOC_AVR_8_LO,
diff --git a/gas/config/tc-avr.h b/gas/config/tc-avr.h
index 777a9df..e82bd01 100644
@@ -139,11 +139,14 @@ extern long md_pcrel_from_section (struct fix *, segT);
|| FIXP->fx_r_type == BFD_RELOC_AVR_LO8_LDI_PM_NEG \
|| FIXP->fx_r_type == BFD_RELOC_AVR_HI8_LDI_PM_NEG \
|| FIXP->fx_r_type == BFD_RELOC_AVR_HH8_LDI_PM_NEG \
+ || FIXP->fx_r_type == BFD_RELOC_AVR_8_LO \
+ || FIXP->fx_r_type == BFD_RELOC_AVR_8_HI \
+ || FIXP->fx_r_type == BFD_RELOC_AVR_8_HLO \
|| FIXP->fx_r_type == BFD_RELOC_AVR_16_PM) \
&& (FIXP->fx_addsy)) \
goto SKIP; \
/* This target is buggy, and sets fix size too large. */
#define TC_FX_SIZE_SLACK(FIX) 2