diff options
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/elflink.c | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index baf6af9..86fec90 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2021-01-08 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/26256 + PR ld/27160 + * elflink.c (elf_fixup_link_order): Verify that fixing up + SHF_LINK_ORDER doesn't increase the output section size. + 2021-01-09 Alan Modra <amodra@gmail.com> * configure: Regenerate. diff --git a/bfd/elflink.c b/bfd/elflink.c index a7c952b..acc959d 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -12039,6 +12039,14 @@ elf_fixup_link_order (struct bfd_link_info *info, bfd *abfd, asection *o) offset = sections[n]->offset + sections[n]->size; free (sections); + + /* Verify that fixing up SHF_LINK_ORDER doesn't increase the section + size. */ + if (offset > o->size) + info->callbacks->einfo + (_("%F%P: %pA has ordered sections with incompatible alignments\n"), + o); + return TRUE; } |