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.
66 lines
1.2 KiB
ArmAsm
66 lines
1.2 KiB
ArmAsm
.section ".text", "ax",@progbits
|
|
.global _start, dest, end_label
|
|
.global func_1, func_2, func_3
|
|
|
|
_start:
|
|
local_start:
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
.type _start, @function
|
|
.size _start, .-_start
|
|
|
|
.type local_start, @function
|
|
.size local_start, .-local_start
|
|
|
|
func_1:
|
|
local_func_1:
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
.type func_1, @function
|
|
.size func_1, .-func_1
|
|
|
|
.type local_func_1, @function
|
|
.size local_func_1, .-local_func_1
|
|
|
|
func_2:
|
|
local_func_2:
|
|
nop
|
|
jmp dest
|
|
jmp dest
|
|
jmp dest
|
|
nop
|
|
.type func_2, @function
|
|
.size func_2, .-func_2
|
|
|
|
.type local_func_2, @function
|
|
.size local_func_2, .-local_func_2
|
|
|
|
func_3:
|
|
local_func_3:
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
.type func_3, @function
|
|
.size func_3, .-func_3
|
|
|
|
.type local_func_3, @function
|
|
.size local_func_3, .-local_func_3
|
|
|
|
dest:
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
nop
|
|
|
|
end_label:
|
|
local_end_label:
|