[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/11822] PE file alignment ignored in objcopy and strip
From: |
toni.spets at iki dot fi |
Subject: |
[Bug binutils/11822] PE file alignment ignored in objcopy and strip |
Date: |
Tue, 05 Aug 2014 08:31:50 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=11822
Toni Spets <toni.spets at iki dot fi> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |toni.spets at iki dot fi
--- Comment #1 from Toni Spets <toni.spets at iki dot fi> ---
After fiddling a while with binutils, I found out that the underlying reason
why file alignment isn't honored.
In bfd/coffcode.h at around line 3139 (current git) inside
coff_compute_section_file_positions it is assumed (abfd)->link_info has to
exist for the optional header FileAlignment to be valid. In objcopy there is no
link_info set so FileAlignment is ignored even though objcopy.c sets it
properly according to --file-alignment argument.
Quick hack of changing that to test if FileAlignment is non-zero properly
aligns output files (apparently).
This does not yet affect --section-alignment.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/11822] PE file alignment ignored in objcopy and strip,
toni.spets at iki dot fi <=