diff options
author | Nick Clifton <nickc@redhat.com> | 2007-03-20 12:18:18 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2007-03-20 12:18:18 +0000 |
commit | 5f6999aa009f62f2fa2c4a0be7eb50e84aedbaac (patch) | |
tree | 726f56cfb56f345cfa4254276501af8e36ddbc14 /bfd | |
parent | 417f79e9ac3eca8c7db15af65d7ef6f11eda0e6d (diff) | |
download | gdb-5f6999aa009f62f2fa2c4a0be7eb50e84aedbaac.zip gdb-5f6999aa009f62f2fa2c4a0be7eb50e84aedbaac.tar.gz gdb-5f6999aa009f62f2fa2c4a0be7eb50e84aedbaac.tar.bz2 |
PR binutils/3535
* elf.c (copy_private_bfd_data): Widen the scope of Solaris specific
conditions that need the program headers to be rewritten.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/elf.c | 22 |
2 files changed, 15 insertions, 14 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 07946e6..7c7ae13 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +2007-03-20 Nick Clifton <nickc@redhat.com> + + PR binutils/3535 + * elf.c (copy_private_bfd_data): Widen the scope of Solaris + specific conditions that need the program headers to be + rewritten. + 2003-03-19 H.J. Lu <hongjiu.lu@intel.com> * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Store Magic, @@ -5915,21 +5915,15 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd) i < num_segments; i++, segment++) { - /* This is a different version of the IS_SOLARIS_PT_INTERP - macro to the one defined in rewrite_elf_program_header(). */ -#define IS_SOLARIS_PT_INTERP(p) \ - (p->p_type == PT_INTERP \ - && p->p_vaddr == 0 \ - && p->p_paddr == 0 \ - && p->p_memsz == 0 \ - && p->p_filesz > 0) - - /* PR binutils/3535. The Solaris interpreter program header - needs special treatment, so we always rewrite the headers - when one is detected. */ - if (IS_SOLARIS_PT_INTERP (segment)) + /* PR binutils/3535. The Solaris linker always sets the p_paddr + and p_memsz fields of special segments (DYNAMIC, INTERP) to 0 + which severly confuses things, so always regenerate the segment + map in this case. */ + if (segment->p_paddr == 0 + && segment->p_memsz == 0 + && (segment->p_type == PT_INTERP || segment->p_type == PT_DYNAMIC)) goto rewrite; - + for (section = ibfd->sections; section != NULL; section = section->next) { |