From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Lance Taylor To: nickc@cygnus.com Cc: binutils@sourceware.cygnus.com Subject: Re: Proposed objcopy patch Date: Thu, 01 Jul 1999 00:00:00 -0000 Message-id: <19990515011618.765.qmail@daffy.airs.com> References: <199905142116.OAA18159@elmo.cygnus.com> <199905142116.OAA18159@elmo.cygnus.com> X-SW-Source: 1999-q2/msg00041.html Date: Fri, 14 May 1999 14:16:02 -0700 From: Nick Clifton Would anyone care to comment on the patch below ? It is a nasty hack which fixes a problem encountered when using objcopy to convert from a PE format image file into SRECs. The PE format uses the LMA field as a virtual size rather a physical address, which confuses BFD when it comes to try to generate SRECs. Please, no. The LMA in isection->lma is in a BFD internal structure. Those structures should be storing generic information. That is, the LMA field should always hold the LMA. If the section lma field does not hold the LMA for PE, then the correct solution is to change the PE backend to store the correct value in the section lma field. Right now PE is probably simply setting the LMA field from the s_paddr field; that would have to change. Of course, the PE backend may rely on this on other ways, so the true section size would to be stored elsewhere in PE specific information, and any code which expected to see the section size in the lma field would have to be changed. Basically, though, it's unacceptable to change objcopy in order to support a specific file format. That destroys the whole point of using BFD in the first place. Ian