[Bug ld/12366] assertion failure with STT_GNU_IFUNC symbols on x86_64

2011-06-03 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12366

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 CC||guido at trentalancia dot
   ||com

--- Comment #8 from H.J. Lu hjl.tools at gmail dot com 2011-06-03 14:49:45 
UTC ---
*** Bug 12838 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/12366] assertion failure with STT_GNU_IFUNC symbols on x86_64

2011-06-03 Thread guido at trentalancia dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12366

--- Comment #9 from Guido Trentalancia guido at trentalancia dot com 
2011-06-03 20:30:23 UTC ---
The ChangeLog diffs do not apply cleanly to the current 2.21 release.

The rest applies cleanly and apparently it also fixes the issue which was
occurring while building glibc 2.14

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/12366] assertion failure with STT_GNU_IFUNC symbols on x86_64

2011-05-25 Thread cvs-commit at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=12366

--- Comment #6 from cvs-commit at gcc dot gnu.org cvs-commit at gcc dot 
gnu.org 2011-05-25 17:41:40 UTC ---
CVSROOT:/cvs/src
Module name:src
Branch: binutils-2_21-branch
Changes by:h...@sourceware.org2011-05-25 17:41:35

Modified files:
ld/testsuite   : ChangeLog 
ld/testsuite/ld-ifunc: ifunc-10-i386.s ifunc-10-x86-64.s 
   ifunc-11-i386.s ifunc-11-x86-64.s 
bfd: ChangeLog elf-ifunc.c elf32-i386.c 
 elf64-x86-64.c 
Added files:
ld/testsuite/ld-ifunc: ifunc-12-i386.d ifunc-12-i386.s 
   ifunc-12-x86-64.d ifunc-12-x86-64.s 
   ifunc-13-i386.d ifunc-13-x86-64.d 
   ifunc-13a-i386.s ifunc-13a-x86-64.s 
   ifunc-13b-i386.s ifunc-13b-x86-64.s 

Log message:
Handle STT_GNU_IFUNC symols when building shared library.

bfd/

2012-05-25  H.J. Lu  hongjiu...@intel.com

Backport from mainline
2012-01-06  H.J. Lu  hongjiu...@intel.com

PR ld/12366
PR ld/12371
* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
handle symbols marked with regular reference, but not non-GOT
reference when building shared library.

* elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
local and global STT_GNU_IFUNC symols when building shared
library.
* elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.

ld/testsuite/

2012-05-25  H.J. Lu  hongjiu...@intel.com

Backport from mainline
2012-01-06  H.J. Lu  hongjiu...@intel.com

PR ld/12366
PR ld/12371
* ld-ifunc/ifunc-10-i386.s: Add more tests.
* ld-ifunc/ifunc-10-x86-64.s: Likewise.
* ld-ifunc/ifunc-11-i386.s: Likewise.
* ld-ifunc/ifunc-11-x86-64.s: Likewise.

* ld-ifunc/ifunc-12-i386.d: New.
* ld-ifunc/ifunc-12-i386.s: Likewise.
* ld-ifunc/ifunc-12-x86-64.d: Likewise.
* ld-ifunc/ifunc-12-x86-64.s: Likewise.
* ld-ifunc/ifunc-13-i386.d: Likewise.
* ld-ifunc/ifunc-13-x86-64.d: Likewise.
* ld-ifunc/ifunc-13a-i386.s: Likewise.
* ld-ifunc/ifunc-13a-x86-64.s: Likewise.
* ld-ifunc/ifunc-13b-i386.s: Likewise.
* ld-ifunc/ifunc-13b-x86-64.s: Likewise.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ChangeLog.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=1.1322.2.11r2=1.1322.2.12
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-12-i386.d.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=NONEr2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-12-i386.s.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=NONEr2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-12-x86-64.d.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=NONEr2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-12-x86-64.s.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=NONEr2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-13-i386.d.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=NONEr2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-13-x86-64.d.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=NONEr2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-13a-i386.s.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=NONEr2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-13a-x86-64.s.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=NONEr2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-13b-i386.s.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=NONEr2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-13b-x86-64.s.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=NONEr2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-10-i386.s.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=1.1r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-10-x86-64.s.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=1.1r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-11-i386.s.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=1.1r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-11-x86-64.s.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=1.1r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=1.5180.2.33r2=1.5180.2.34
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf-ifunc.c.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=1.4r2=1.4.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf32-i386.c.diff?cvsroot=srconly_with_tag=binutils-2_21-branchr1=1.241.2.1r2=1.241.2.2

[Bug ld/12366] assertion failure with STT_GNU_IFUNC symbols on x86_64

2011-01-06 Thread cvs-commit at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=12366

--- Comment #1 from cvs-commit at gcc dot gnu.org cvs-commit at gcc dot 
gnu.org 2011-01-06 18:45:09 UTC ---
CVSROOT:/cvs/src
Module name:src
Changes by:h...@sourceware.org2011-01-06 18:45:05

Modified files:
bfd: ChangeLog elf-ifunc.c elf32-i386.c 
 elf64-x86-64.c 
ld/testsuite   : ChangeLog 
ld/testsuite/ld-ifunc: ifunc-10-i386.s ifunc-10-x86-64.s 
   ifunc-11-i386.s ifunc-11-x86-64.s 
Added files:
ld/testsuite/ld-ifunc: ifunc-12-i386.d ifunc-12-i386.s 
   ifunc-12-x86-64.d ifunc-12-x86-64.s 
   ifunc-13-i386.d ifunc-13-x86-64.d 
   ifunc-13a-i386.s ifunc-13a-x86-64.s 
   ifunc-13b-i386.s ifunc-13b-x86-64.s 

Log message:
Handle STT_GNU_IFUNC symols when building shared library.

bfd/

2012-01-06  H.J. Lu  hongjiu...@intel.com

PR ld/12366
PR ld/12371
* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
handle symbols marked with regular reference, but not non-GOT
reference when building shared library.

* elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
local and global STT_GNU_IFUNC symols when building shared
library.
* elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.

ld/testsuite/

2012-01-06  H.J. Lu  hongjiu...@intel.com

PR ld/12366
PR ld/12371
* ld-ifunc/ifunc-10-i386.s: Add more tests.
* ld-ifunc/ifunc-10-x86-64.s: Likewise.
* ld-ifunc/ifunc-11-i386.s: Likewise.
* ld-ifunc/ifunc-11-x86-64.s: Likewise.

* ld-ifunc/ifunc-12-i386.d: New.
* ld-ifunc/ifunc-12-i386.s: Likewise.
* ld-ifunc/ifunc-12-x86-64.d: Likewise.
* ld-ifunc/ifunc-12-x86-64.s: Likewise.
* ld-ifunc/ifunc-13-i386.d: Likewise.
* ld-ifunc/ifunc-13-x86-64.d: Likewise.
* ld-ifunc/ifunc-13a-i386.s: Likewise.
* ld-ifunc/ifunc-13a-x86-64.s: Likewise.
* ld-ifunc/ifunc-13b-i386.s: Likewise.
* ld-ifunc/ifunc-13b-x86-64.s: Likewise.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=srcr1=1.5223r2=1.5224
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf-ifunc.c.diff?cvsroot=srcr1=1.4r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf32-i386.c.diff?cvsroot=srcr1=1.241r2=1.242
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf64-x86-64.c.diff?cvsroot=srcr1=1.204r2=1.205
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ChangeLog.diff?cvsroot=srcr1=1.1348r2=1.1349
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-12-i386.d.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-12-i386.s.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-12-x86-64.d.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-12-x86-64.s.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-13-i386.d.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-13-x86-64.d.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-13a-i386.s.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-13a-x86-64.s.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-13b-i386.s.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-13b-x86-64.s.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-10-i386.s.diff?cvsroot=srcr1=1.1r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-10-x86-64.s.diff?cvsroot=srcr1=1.1r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-11-i386.s.diff?cvsroot=srcr1=1.1r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/ifunc-11-x86-64.s.diff?cvsroot=srcr1=1.1r2=1.2

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/12366] assertion failure with STT_GNU_IFUNC symbols on x86_64

2011-01-06 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12366

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #2 from H.J. Lu hjl.tools at gmail dot com 2011-01-06 18:48:15 
UTC ---
Fixed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/12366] assertion failure with STT_GNU_IFUNC symbols on x86_64

2011-01-06 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12366

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Blocks||12372

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/12366] assertion failure with STT_GNU_IFUNC symbols on x86_64

2011-01-06 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12366

--- Comment #3 from H.J. Lu hjl.tools at gmail dot com 2011-01-07 02:06:39 
UTC ---
(In reply to comment #0)
 Created attachment 5181 [details]
 Shell script to reproduce bug
 
 The x86 and x86_64 IFUNC code assumes that check_relocs can rely on 
 def_regular
 being set for all regular definitions.  That's not true, because def_regular 
 is
 set by the same pass that calls check_relocs, and doesn't therefore take into
 account regular definitions in later objects.

We handle relocations against local STT_GNU_IFUNC symbols by
faking a STT_GNU_IFUNC symbol. def_regular is true for
those symbols.

My fix in _bfd_elf_allocate_ifunc_dyn_relocs handles
the case where a symbol is marked with regular reference,
but not non-GOT reference.  It may happen if we didn't
see STT_GNU_IFUNC symbol when checking relocations.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/12366] assertion failure with STT_GNU_IFUNC symbols on x86_64

2011-01-05 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12366

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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