This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: arm-wince-pe support resurrection


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
        


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]