Hi, I have now found out a couple of issues that show up when using linker relaxation with the present cvs state. The attached patch is supposed to fix these bugs. One problem was that the adjustment of changed addresses (address changes due to the code-shrinking) were only applied in the .text section itself. It could, however happen that there are references in the .data or .rodata sections of the same module. E.g. when considering initialized function pointer tables. With the attached patch the "delete_bytes" function now looks for relocs in all of the sections of an individual bfd. The second issue that this patch addresses are PC relative expressions that seemingly could be resolved at assembly time, but that could become invalid when the code shrinks due to relaxation. With the patch gas is ordered to always use relocs instead of fixups for these program memory related address expressions. The patch has been tested on several hardware projects without exhibiting problems. Code size reduction amounted to 2-3 % for an 128k device and to 5-6% on a 16k device. The gas testsuite did not exhibit new regressions. OK for mainline? Bjoern 2006-04-19  Bjoern Haase           * bfd/elf32-avr.c:         elf32_avr_relax_delete_bytes: Iterate over all of the bfd's sections for reloc-addend adjustments.         * gas/config/tc-avr.h:         TC_VALIDATE_FIX: add. -------------------------------------------------------