binutils-gdb/ld/testsuite/ld-avr/avr-prop-5.d
Denis Chertykov 5c41dbc302 Fix PR 20221 - adjust syms and relocs only if relax shrunk section.
This patch fixes an edge case in linker relaxation that causes symbol
values to be computed incorrectly in the presence of align directives
in input source code.

bfd/
	* elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust syms
	and relocs only if shrinking occurred.

ld/
	* testsuite/ld-avr/avr-prop-5.d: New.
	* testsuite/ld-avr/avr-prop-5.s: New.
2016-06-09 19:17:43 +03:00

10 lines
221 B
Makefile

#name: AVR .avr.prop, single .align proper sym val test.
#as: -mmcu=avrxmega2 -mlink-relax
#ld: -mavrxmega2 --relax
#source: avr-prop-5.s
#objdump: -S
#target: avr-*-*
#...
0: 00 d0\s+rcall\s+\.\+0\s+; 0x2 <dest>
#...