This is the mail archive of the binutils@sourceware.org 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: PATCH: segfault in bfd with large static binary


Hi H. J.

I think we can rename copy_private_bfd_data in elf.c to something
like rewrite_elf_program_header and add a new function,
copy_elf_program_header. Then copy_private_bfd_data can be

  if any section covered by ELF program header is changed then
    call rewrite_elf_program_header
  else
    call copy_elf_program_header

I really don't mind if rewrite_elf_program_header doesn't work
correctly in all cases. But copy_elf_program_header should work
correctly in all cases.

This approach sounds fine to me. Just please be careful when testing it (I am assuming that you are volunteering! :-) to make sure that you test as big a range of targets as possible and especially to look for possible uses of objcopy and strip that might encounter problems with the new code.


Cheers
  Nick



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