[Bug ld/6893] Partial linking results in corrupt .eh_frame_hdr

2008-09-17 Thread jan dot kratochvil at redhat dot com

--- Additional Comments From jan dot kratochvil at redhat dot com  
2008-09-17 07:58 ---
Committed the attached patch:
http://sourceware.org/ml/binutils-cvs/2008-09/msg00089.html

bfd/
PR 6893 - Do not consider FDEs for discarded sections as invalid.
* elf-eh-frame.c (_bfd_elf_parse_eh_frame): New REQUIRE_CLEARED_RELOCS.
Consider FDEs with cleared relocations as valid and ignorable.

ld/testsuite/
* ld-elf/eh-group.exp, ld-elf/eh-group1.s, ld-elf/eh-group2.s: New test.

binutils/
Suppress warnings on NONE relocations to discarded sections.
* readelf.c (is_none_reloc): New function.
(debug_apply_relocations): Ignore is_none_reloc() relocations.


-- 
   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=6893

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/6494] ICE in bfd/elf.c line 4622 in assign_file_positions_for_non_load_sections

2008-09-17 Thread amodra at bigpond dot net dot au

--- Additional Comments From amodra at bigpond dot net dot au  2008-09-17 
11:25 ---
Testcase in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493651

  GNU_RELRO  0x016bc8 0x00216bc8 0x00216bc8 0x0003d0
0x0003c0 R   0x1

I don't know how we managed to get p_filesz (0x3d) != p_memsz (0x3c0).
HJ, why did you add the p_filesz == p_memsz test in the following:

  if (map->p_type == PT_GNU_RELRO
  && segment->p_filesz == segment->p_memsz)
{
  /* The PT_GNU_RELRO segment may contain the first a few
 bytes in the .got.plt section even if the whole .got.plt
 section isn't in the PT_GNU_RELRO segment.  We won't
 change the size of the PT_GNU_RELRO segment.  */
  map->p_size = segment->p_filesz;
  map->p_size_valid = 1;
}

That results in p_size_valid == 0 for this testcase which then triggers the 
abort.

-- 
   What|Removed |Added

 Status|WAITING |NEW
   Last reconfirmed|-00-00 00:00:00 |2008-09-17 11:25:36
   date||


http://sourceware.org/bugzilla/show_bug.cgi?id=6494

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/6494] ICE in bfd/elf.c line 4622 in assign_file_positions_for_non_load_sections

2008-09-17 Thread hjl dot tools at gmail dot com

--- Additional Comments From hjl dot tools at gmail dot com  2008-09-17 
17:19 ---
(In reply to comment #3)
> Testcase in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493651
> 
>   GNU_RELRO  0x016bc8 0x00216bc8 0x00216bc8 0x0003d0
> 0x0003c0 R   0x1
> 
> I don't know how we managed to get p_filesz (0x3d) != p_memsz (0x3c0).
> HJ, why did you add the p_filesz == p_memsz test in the following:
> 
>   if (map->p_type == PT_GNU_RELRO
> && segment->p_filesz == segment->p_memsz)
>   {
> /* The PT_GNU_RELRO segment may contain the first a few
>bytes in the .got.plt section even if the whole .got.plt
>section isn't in the PT_GNU_RELRO segment.  We won't
>change the size of the PT_GNU_RELRO segment.  */
> map->p_size = segment->p_filesz;
> map->p_size_valid = 1;
>   }
> 
> That results in p_size_valid == 0 for this testcase which then triggers the 
> abort.

Something is wrong with GNU_RELRO segment in libpthread-2.7.so:

1. Why is p_filesz != p_memsz?
2. What does p_filesz > p_memsz mean?

I got

  GNU_RELRO  0x016bc8 0x00216bc8 0x00216bc8 0x0003d0
0x0003c0 R   0x1
...
  08 .ctors .dtors .jcr .data.rel.ro 

For libpthread-2.7.so in Fedora 8, I got

  GNU_RELRO  0x015ba8 0x003035015ba8 0x003035015ba8 0x000458
0x000458 R   0x1
...
   08 .ctors .dtors .jcr .data.rel.ro .dynamic .got 

Please provide ALL inputs used to create the bad libpthread-2.7.so.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6494

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils