mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 16:23:28 +08:00
a12d0ffc72
Symbols at the very end of a section were not being updated correctly when linker relaxation takes place due to the use of '<' instead of '<='. Added a couple of tests to cover this behaviour. bfd/ChangeLog: * elf32-avr.c (elf32_avr_relax_delete_bytes): Modify symbols located at the very end of the section. ld/ChangeLog: * ld/testsuite/ld-avr/relax-02.d: New file. * ld/testsuite/ld-avr/relax-02.s: New file. * ld/testsuite/ld-avr/relax-03.d: New file. * ld/testsuite/ld-avr/relax-03.s: New file.
27 lines
640 B
Makefile
27 lines
640 B
Makefile
#name: AVR relaxation, single function in section.
|
|
#as: -mmcu=avrxmega2 -mlink-relax
|
|
#ld: -mavrxmega2 --relax
|
|
#source: relax-03.s
|
|
#objdump: -tzd
|
|
#target: avr-*-*
|
|
|
|
.*: file format elf32-avr
|
|
|
|
SYMBOL TABLE:
|
|
#...
|
|
00000000 l F .text [0-9a-f]+ local_start
|
|
0000000a l .text 00000000 local_end_label
|
|
#...
|
|
00000000 g F \.text [0-9a-f]+ _start
|
|
0000000a g \.text 00000000 end_label
|
|
#...
|
|
|
|
Disassembly of section \.text:
|
|
|
|
00000000 <_start>:
|
|
0: 00 00 nop
|
|
2: 03 c0 rjmp \.\+6 ; 0xa <.*>
|
|
4: 02 c0 rjmp \.\+4 ; 0xa <.*>
|
|
6: 01 c0 rjmp \.\+2 ; 0xa <.*>
|
|
8: 00 00 nop
|