diff options
author | Jan Beulich <jbeulich@suse.com> | 2024-09-06 08:34:24 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2024-09-06 08:34:24 +0200 |
commit | a844415db8784bf92c0adc7163dc9b5c552a84e1 (patch) | |
tree | 1f2feee4710e6b8b78ec3f407df6eb4f6feef0a7 /bfd | |
parent | f12eb19e1794fe7e7a7414f628a17991b4bc4f61 (diff) | |
download | gdb-a844415db8784bf92c0adc7163dc9b5c552a84e1.zip gdb-a844415db8784bf92c0adc7163dc9b5c552a84e1.tar.gz gdb-a844415db8784bf92c0adc7163dc9b5c552a84e1.tar.bz2 |
bfd/PE: correct SizeOfImage calculation
We don't really want to align the last section's size to object
alignment (when that section may itself not be aligned as much), we want
image size to be a multiple thereof.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/peXXigen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c index 51b567e..c09d16e 100644 --- a/bfd/peXXigen.c +++ b/bfd/peXXigen.c @@ -699,8 +699,8 @@ _bfd_XXi_swap_aouthdr_out (bfd * abfd, void * in, void * out) for the image size. */ if (coff_section_data (abfd, sec) != NULL && pei_section_data (abfd, sec) != NULL) - isize = (sec->vma - extra->ImageBase - + SA (FA (pei_section_data (abfd, sec)->virt_size))); + isize = SA (sec->vma - extra->ImageBase + + FA (pei_section_data (abfd, sec)->virt_size)); } aouthdr_in->dsize = dsize; |