[Bug ld/11791] New: Garbage collection for STT_GNU_IFUNC symbols

2010-07-05 Thread stephen dot clarke at st dot com
$ cat test.s
.section .text.foo,"ax",@progbits
.type foo, @function
foo:
.global foo
movl if...@got(%ecx), %eax
ret

.section .text.bar,"ax",@progbits
.type bar, @function
bar:
.global bar
ret

.section .text.ifunc,"ax",@progbits
.type ifunc, @gnu_indirect_function
ifunc:
ret

$ as -o test.o test.s
$ ld -e bar --gc-sections test.o

If I use a recent version of binutils:
$ ld -v
GNU ld (GNU Binutils) 2.20.51.20100702

then for the ld command I get segv, i.e.
$ ld -e bar --gc-sections test.o
Segmentation fault

but if I hack out the cause of that, then I get an executable in
which garbage collection has removed all the original sections that
refer to the ifunc symbol, but there is still a plt entry, got entry
and  dynamic relocation for the ifunc symbol.

$ objdump -h -d a.out

a.out: file format elf32-i386

Sections:
Idx Name  Size  VMA   LMA   File off  Algn
  0 .rel.plt  0008  08048074  08048074  0074  2**2
  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .plt  0010  0804807c  0804807c  007c  2**2
  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .text 0001  0804808c  0804808c  008c  2**0
  CONTENTS, ALLOC, LOAD, READONLY, CODE
  3 .got.plt  0010  08049090  08049090  0090  2**2
  CONTENTS, ALLOC, LOAD, DATA

Disassembly of section .plt:

0804807c <.plt>:
 804807c:   ff 25 9c 90 04 08   jmp*0x804909c
 8048082:   68 00 00 00 00  push   $0x0
 8048087:   e9 00 00 00 00  jmp804808c 

Disassembly of section .text:

0804808c :
 804808c:   c3  ret

-- 
   Summary: Garbage collection for STT_GNU_IFUNC symbols
   Product: binutils
   Version: 2.20
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: stephen dot clarke at st dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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

--- 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 gas/10856] [2.20 regression] gas creates wrong code which results in a test failure in libcrypto++'s sha2 test

2010-07-05 Thread zooko at zooko dot com

--- Additional Comments From zooko at zooko dot com  2010-07-06 04:44 
---
Hey folks, some distributions such as MinGW have still not patched their 
version of binutils or reverted 
to binutils 2.19:

https://sourceforge.net/tracker/index.php?func=detail&aid=2913876&group_id=2435&atid=102435

This is still causing problems for my users:

http://tahoe-lafs.org/trac/tahoe-lafs/ticket/853

If you folks could go ahead and release a binutil 2.20.1 then that might 
stimulate distributors like 
MinGW to upgrade to it and that would fix the problem for my users. Thanks!

-- 


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

--- 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