aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-bpf.c
diff options
context:
space:
mode:
authorJozef Lawrynowicz <jozef.l@mittosystems.com>2020-08-05 12:55:07 +0100
committerJozef Lawrynowicz <jozef.l@mittosystems.com>2020-08-06 11:19:36 +0100
commit1a9f72a7a8f445b8d665eb36b053a18e758e63e6 (patch)
tree550308f9d1d9aac07f047803a31470b844c5a9b5 /bfd/elf64-bpf.c
parentb5582ab72f025c54d4a6e8f459f78a8c92e6df29 (diff)
downloadfsf-binutils-gdb-1a9f72a7a8f445b8d665eb36b053a18e758e63e6.zip
fsf-binutils-gdb-1a9f72a7a8f445b8d665eb36b053a18e758e63e6.tar.gz
fsf-binutils-gdb-1a9f72a7a8f445b8d665eb36b053a18e758e63e6.tar.bz2
MSP430: ld: Update output section tail when shuffling ".either" sections
The MSP430 linker shuffles input sections with names beginning with ".either" between the upper and lower memory regions, to try to avoid one region overflowing when there is space in the other region. However, when an ".either" input section attached to the tail of an output section was moved to a different output section in the other region, that tail wasn't being updated to the new section at the end of the original output section. This caused a bug where a shuffled section could end up in the middle of another section in the output executable, resulting in corrupted code or data. When changing the output section of an input section attached to the tail of its output section, that tail is now updated to point to the new input section at the end of the section list. ld/ChangeLog: 2020-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com> * emultempl/msp430.em (change_output_section): Update the tail of the output section statement list when moving the original tail to a different output section. (eval_upper_either_sections): Don't move sections from the upper region to the lower region unless the upper region is overflowing.
Diffstat (limited to 'bfd/elf64-bpf.c')
0 files changed, 0 insertions, 0 deletions