This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: arm-wince-pe support resurrection
- From: Nick Clifton <nickc at redhat dot com>
- To: <Dmitry dot Semyonov at oktet dot ru>
- Cc: <binutils at sources dot redhat dot com>
- Date: Mon, 01 Dec 2003 18:40:21 +0000
- Subject: Re: arm-wince-pe support resurrection
- References: <Pine.LNX.4.33.0311182221220.15453-103000@mail.oktet.ru>
Hi Dmitry,
> Attached patches are aimed to resurrect some broken or incompatible
> with MS linker features of arm-wince-pe support:
> - partial linking (ld -r)
> - flags of special sections
> - relocations
These patches contain quite a few different changes/fixes, so I am
going to go through them one by one over the next few days. Here is
the first:
bfd/ChangeLog
2003-11-20 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
* coffcode.h (coff_compute_section_file_positions): set page_size
to 1 instead of 0 in the case file alignment value is zero. This
eliminates 'ld -r' "bad value" failure for arm-wince-pe target.
diff -rNc3p binutils-031114/bfd/coffcode.h /home/sdv/cross/binutils-031114/bfd/coffcode.h
*** binutils-031114/bfd/coffcode.h Tue Nov 4 13:41:51 2003
--- /home/sdv/cross/binutils-031114/bfd/coffcode.h Mon Nov 17 21:06:50 2003
*************** coff_compute_section_file_positions (abf
*** 3014,3019 ****
--- 3014,3023 ----
if (coff_data (abfd)->link_info)
{
page_size = pe_data (abfd)->pe_opthdr.FileAlignment;
+
+ /* Improve robustness. This repairs 'ld -r' for arm-wince-pe target. */
+ if (page_size == 0)
+ page_size++;
}
else
page_size = PE_DEF_FILE_ALIGNMENT;
I have approved this patch and applied it. I altered the comment
slightly to make it more obvious why page_size is being changed.
Cheers
Nick