[Bug ld/26936] ld drops relocation for .text.__x86.get_pc_thunk.bx

2020-11-30 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26936

--- Comment #24 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by H.J. Lu :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=15eb8c2d923343363be1c6cfb74134ea019236bb

commit 15eb8c2d923343363be1c6cfb74134ea019236bb
Author: H.J. Lu 
Date:   Mon Nov 30 05:21:51 2020 -0800

ld: Xfail PR ld/26936 test if not supported

Linkonce sections and comdat groups can be mixed only if comdat groups
have only a single member with matching symbol table entries.  Xfail
ld/26936 test:

1. If comdat groups always have more than one member.
2. If symbol table entries in linkonce and comdat group don't match.
3. If the assembly source file is renamed.

PR ld/26936
* testsuite/ld-elf/pr26936.d: Xfail targets which don't support
mixing linkonce and comdat sections.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/26936] ld drops relocation for .text.__x86.get_pc_thunk.bx

2020-11-26 Thread matz at suse dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=26936

--- Comment #22 from Michael Matz  ---
(In reply to Fangrui Song from comment #20)
> (I thought that .gnu.linkonce was deprecated almost 20 years ago and we
> should phase out linkonce instead of adding more compatibility code...)

Deprecation != not used anymore in the wild.  In this case it's crt files
compiled
with options intentionally emitting linkonce, not comdat, sections, also for
compatibility.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/26936] ld drops relocation for .text.__x86.get_pc_thunk.bx

2020-11-26 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26936

--- Comment #21 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Alan Modra :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9ed0136bff648c2f32d7462d3ab9205b61778837

commit 9ed0136bff648c2f32d7462d3ab9205b61778837
Author: Alan Modra 
Date:   Thu Nov 26 17:45:26 2020 +1030

PR26936 testsuite fixes

Many targets fail this test due to -z noseparate-code not being
supported, or _start not being the proper entry symbol, or "as -g"
something other than "generate debug".

PR 26936
* testsuite/ld-elf/pr26936.d: Pass --gen-debug to gas rather than
-g.
Only run when -shared -z options are supported.
* testsuite/ld-elf/pr26936b.s: Define more entry symbols.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/26936] ld drops relocation for .text.__x86.get_pc_thunk.bx

2020-11-25 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=26936

Fangrui Song  changed:

   What|Removed |Added

 CC||i at maskray dot me

--- Comment #20 from Fangrui Song  ---
(I thought that .gnu.linkonce was deprecated almost 20 years ago and we should
phase out linkonce instead of adding more compatibility code...)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/26936] ld drops relocation for .text.__x86.get_pc_thunk.bx

2020-11-25 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26936

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #19 from H.J. Lu  ---
Fixed for 2.36.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/26936] ld drops relocation for .text.__x86.get_pc_thunk.bx

2020-11-25 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=26936

--- Comment #18 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by H.J. Lu :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=58349d00f461904f20dae88d48c1fda11cbb47bc

commit 58349d00f461904f20dae88d48c1fda11cbb47bc
Author: H.J. Lu 
Date:   Wed Nov 25 16:14:13 2020 -0800

elf: Get the real kept section

When mixing linkonce and comdat sections, we need to keep searching to
get the real kept section.

bfd/

PR ld/26936
* elflink.c (_bfd_elf_check_kept_section): Get the real kept
section.

ld/

PR ld/26936
* testsuite/ld-elf/pr26936.d: New file.
* testsuite/ld-elf/pr26936a.s: Likewise.
* testsuite/ld-elf/pr26936b.s: Likewise.
* testsuite/ld-elf/pr26936c.s: Likewise.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/26936] ld drops relocation for .text.__x86.get_pc_thunk.bx

2020-11-25 Thread matz at suse dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=26936

--- Comment #17 from Michael Matz  ---
(In reply to H.J. Lu from comment #15)
> My /lib/crti.o has
> 
> COMDAT group section [1] `.group' [__x86.get_pc_thunk.bx] contains 1
> sections:
>[Index]Name
>[8]   .text.__x86.get_pc_thunk.bx

Sure, which is why I have provided sources.  We have to support old systems
with oldish glibc, and that has linkonce sections in those files.

Thanks for the patch, it works.  But I think you want to check kept != NULL
before going into the loop.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/26936] ld drops relocation for .text.__x86.get_pc_thunk.bx

2020-11-25 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26936

H.J. Lu  changed:

   What|Removed |Added

   Target Milestone|--- |2.36
 Status|UNCONFIRMED |NEW
Summary|[ld, PIE] ld drops  |ld drops relocation for
   |relocation for  |.text.__x86.get_pc_thunk.bx
   |.text.__x86.get_pc_thunk.bx |
 Ever confirmed|0   |1
   Last reconfirmed|2020-11-24 00:00:00 |2020-11-25

--- Comment #16 from H.J. Lu  ---
A patch is posted at

https://sourceware.org/pipermail/binutils/2020-November/114281.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.