[Bug ld/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs

2021-01-19 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24276

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |NOTABUG

--- Comment #7 from H.J. Lu  ---
Fixed for 2.33

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


[Bug ld/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs

2019-02-27 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=24276

--- Comment #6 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=5cfe428cd1788be52a0af540f02b8f2705354d50

commit 5cfe428cd1788be52a0af540f02b8f2705354d50
Author: H.J. Lu 
Date:   Wed Feb 27 11:53:16 2019 -0800

x86-64: Skip protected check on symbol defined by linker

Skip symbol defined by linker when checking copy reloc on protected
symbol.

bfd/

PR ld/24276
* elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined
by linker when checking copy reloc on protected symbol.

ld/

PR ld/24276
* testsuite/ld-i386/i386.exp: Run PR ld/24276 test.
* testsuite/ld-x86-64/x86-64.exp: Likewise.
* testsuite/ld-i386/pr24276.dso: New file.
* testsuite/ld-i386/pr24276.warn: Likewise.
* testsuite/ld-x86-64/pr24276.dso: Likewise.
* testsuite/ld-x86-64/pr24276.warn: Likewise.

-- 
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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs

2019-02-27 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24276

--- Comment #5 from H.J. Lu  ---
A patch:

https://sourceware.org/ml/binutils/2019-02/msg00130.html

-- 
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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs

2019-02-27 Thread wferi at niif dot hu
https://sourceware.org/bugzilla/show_bug.cgi?id=24276

Ferenc Wágner  changed:

   What|Removed |Added

 CC||wferi at niif dot hu

-- 
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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs

2019-02-27 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24276

--- Comment #4 from H.J. Lu  ---
[hjl@gnu-cfl-1 pr24276]$ cat x.c 
int __attribute__((section("my_section"))) a[2] = {0x1234, 0x5678};

extern int __start_my_section;

int
foo ()
{
   int* ap = &__start_my_section;
   return ap[0];
}
[hjl@gnu-cfl-1 pr24276]$ cat z.c
int __attribute__((section("my_section"))) a[2] = {0x1234, 0x5678};

extern int __start_my_section;

int
_start ()
{
   int* ap = &__start_my_section;
   return ap[0];
}
[hjl@gnu-cfl-1 pr24276]$ make
gcc -fPIC -O2   -c -o z.o z.c
gcc -fPIC -O2   -c -o x.o x.c
ld -shared  -o x.so.1 x.o
echo "INPUT(x.so.1)" > x.so
echo "SECTIONS {" >> x.so
echo "  my_section : {" >> x.so
echo "__start_my_section = .;" >> x.so
echo "*(my_section);" >> x.so
echo "__stop_my_section = .;" >> x.so
echo "" >> x.so
echo "  }" >> x.so
echo "}" >> x.so
ld -shared  -o z.so z.o x.so
ld: warning: x.so contains output sections; did you forget -T?
make: *** [Makefile:14: z.so] Segmentation fault
make: *** Deleting file 'z.so'
[hjl@gnu-cfl-1 pr24276]$

-- 
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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs

2019-02-27 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24276

--- Comment #3 from Matthias Klose  ---
there's a custom linker script in the libqb source

$ cat lib/qblog_script.ld.in 
#include 
/* GNU ld script
   This atypical arrangement enforces global visibility of boundary symbols
   (QB_ATTR_SECTION_START, QB_ATTR_SECTION_STOP) for the custom section
   QB_ATTR_SECTION used for compile-time offloading of the logging call sites
   tracking.  While libqb relies on these being global, default linker from
   binutils change the visibility as of version 2.29, making the logging
   unusable without artificial stimulus: https://bugzilla.redhat.com/1477354

   NOTE: If -lqb not usable for linking (e.g. linker not compatible with
 linker scripts ad-hoc modifying output sections), try recent
 ld.bfd/binutils linker first when available, otherwise you can
 try "-l:libqb.so." link switch that bypasses said linker
 script -- but beware, logging may be less efficient and may lack
 possible future optimizations and extra features.  Consequently,
 logging issues (typically bound to QB_LOG_INIT_DATA macro) can be
 mitigated with QB_KILL_ATTRIBUTE_SECTION macro defined for a build.
   NOTE: When concerned about a warning coming from the build process like
 warning: [...]libqb.so contains output sections; did you forget -T?
 while it finishes OK, consider it merely a harmless side-effect.
 */
SECTIONS {
#ifdef QB_HAVE_ATTRIBUTE_SECTION
  QB_ATTR_SECTION : {
QB_ATTR_SECTION_START = .;
*(QB_ATTR_SECTION);
QB_ATTR_SECTION_STOP = .;
  }
#endif
}

-- 
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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs

2019-02-27 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24276

H.J. Lu  changed:

   What|Removed |Added

   Assignee|unassigned at sourceware dot org   |hjl.tools at gmail dot 
com
   Target Milestone|--- |2.33

-- 
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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs

2019-02-27 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24276

H.J. Lu  changed:

   What|Removed |Added

 CC|hjl at sourceware dot org  |hjl.tools at gmail dot 
com

-- 
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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs

2019-02-27 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24276

--- Comment #2 from Matthias Klose  ---
no, I see this on the x86_64 Debian buildds as well, so doesn't seem to be
related.

-- 
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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs

2019-02-27 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24276

Nick Clifton  changed:

   What|Removed |Added

 CC||nickc at redhat dot com

--- Comment #1 from Nick Clifton  ---
Hi Matthias,

  I cannot reproduce this problem, using either the current mainline sources,
  the 2.32 branch sources or the 2.31 branch sources, and using both ld.bfd
  and ld.gold. :-(

  Is it possible that this is an artefact of the host system ?  Ie were the
  tests being run on a 32-bit host ?

Cheers
  Nick

-- 
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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs

2019-02-27 Thread doko at debian dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24276

Matthias Klose  changed:

   What|Removed |Added

 Target||x86_64-linux-gnu
 CC||hjl at sourceware dot org

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