PR22048, Incorrect .eh_frame section in libc.so
PR 21441 PR 22048 * elflink.c (bfd_elf_discard_info): Don't pad embedded zero terminators.
This commit is contained in:
parent
3321e42bf2
commit
af471f828c
|
@ -1,3 +1,10 @@
|
|||
2017-08-31 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 21441
|
||||
PR 22048
|
||||
* elflink.c (bfd_elf_discard_info): Don't pad embedded zero
|
||||
terminators.
|
||||
|
||||
2017-08-30 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* configure.ac (bfd_backends): Add elf64.lo together with
|
||||
|
|
|
@ -13878,10 +13878,15 @@ bfd_elf_discard_info (bfd *output_bfd, struct bfd_link_info *info)
|
|||
/* Any prior sections must pad the last FDE out to the
|
||||
output section alignment. Otherwise we might have zero
|
||||
padding between sections, which would be seen as a
|
||||
terminator. */
|
||||
terminator. If there is a terminator in the middle of
|
||||
FDEs, don't increase its size as that will write bogus
|
||||
data of whatever was after the terminator in the input
|
||||
file, to the output file. */
|
||||
for (; i != NULL; i = i->map_tail.s)
|
||||
if (i->size != 4)
|
||||
{
|
||||
bfd_size_type size = (i->size + eh_alignment - 1) & -eh_alignment;
|
||||
bfd_size_type size
|
||||
= (i->size + eh_alignment - 1) & -eh_alignment;
|
||||
if (i->size != size)
|
||||
{
|
||||
i->size = size;
|
||||
|
|
Loading…
Reference in New Issue