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: Objcopy fix for relocation sections


On Mon, Dec 22, 2003 at 04:05:44PM -0500, Daniel Jacobowitz wrote:
> I got a bug report that objcopy failed for shared libraries with "File
> truncated" on arm-linux.  The problem was that ARM keeps relocations for
> debug information, and objcopy never arranged for
> elf.c:assign_file_position_for_relocs to be called.  This patch was the best
> solution I could come up with - is it OK?
> 
> 	* elf.c (_bfd_elf_set_section_contents): If a relocation section
> 	does not have an offset, assign one.

I can't say I like it particularly.  I think it would be better to
set the file offsets for relocs in assign_file_positions_except_relocs.
I know that goes against the name of the function, but we set offsets
for .rela.dyn and other loaded reloc sections in executables and
shared libs there anyway..

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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