[Bug ld/27491] ld: relocation R_X86_64_PC32 against undefined protected symbol `__start_xx' can not be used when making a shared object

2021-12-02 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=27491

--- Comment #9 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=794f2bba0f338d467bbf9c55b5aba415ecd5e138

commit 794f2bba0f338d467bbf9c55b5aba415ecd5e138
Author: H.J. Lu 
Date:   Wed Dec 1 04:55:24 2021 -0800

x86: Skip __[start|stop]_SECNAME for --gc-sections -z start-stop-gc

Don't convert memory load to immediate load on __start_SECNAME and
__stop_SECNAME for --gc-sections -z start-stop-gc if all SECNAME
sections been garbage collected.

bfd/

PR ld/27491
* elf32-i386.c (elf_i386_convert_load_reloc): Skip __start_SECNAME
and __stop_SECNAME for --gc-sections -z start-stop-gc if the input
section been garbage collected.
* elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
* elfxx-x86.h (elf_x86_start_stop_gc_p): New function.

ld/
PR ld/27491
* testsuite/ld-i386/i386.exp: Run PR ld/27491 tests.
* testsuite/ld-x86-64/x86-64.exp: Likewise.
* testsuite/ld-i386/pr27491-1.s: New file.
* testsuite/ld-i386/pr27491-1a.d: Likewise.
* testsuite/ld-i386/pr27491-1b.d: Likewise.
* testsuite/ld-i386/pr27491-1c.d: Likewise.
* testsuite/ld-i386/pr27491-2.d: Likewise.
* testsuite/ld-i386/pr27491-2.s: Likewise.
* testsuite/ld-i386/pr27491-3.d: Likewise.
* testsuite/ld-i386/pr27491-3.s: Likewise.
* testsuite/ld-i386/pr27491-4.d: Likewise.
* testsuite/ld-i386/pr27491-4a.s: Likewise.
* testsuite/ld-i386/pr27491-4b.s: Likewise.
* testsuite/ld-x86-64/pr27491-1.s: Likewise.
* testsuite/ld-x86-64/pr27491-1a.d: Likewise.
* testsuite/ld-x86-64/pr27491-1b.d: Likewise.
* testsuite/ld-x86-64/pr27491-1c.d: Likewise.
* testsuite/ld-x86-64/pr27491-2.d: Likewise.
* testsuite/ld-x86-64/pr27491-2.s: Likewise.
* testsuite/ld-x86-64/pr27491-3.d: Likewise.
* testsuite/ld-x86-64/pr27491-3.s: Likewise.
* testsuite/ld-x86-64/pr27491-4.d: Likewise.
* testsuite/ld-x86-64/pr27491-4a.s: Likewise.
* testsuite/ld-x86-64/pr27491-4b.s: Likewise.

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


[Bug ld/27491] ld: relocation R_X86_64_PC32 against undefined protected symbol `__start_xx' can not be used when making a shared object

2021-12-02 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27491

H.J. Lu  changed:

   What|Removed |Added

   Target Milestone|--- |2.38
 Status|NEW |RESOLVED
Version|unspecified |2.38 (HEAD)
 Resolution|--- |FIXED

--- Comment #10 from H.J. Lu  ---
Fixed for 2.38.

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


[Bug binutils/28645] New: Assertion `(p) <= (limit)' failed.

2021-12-02 Thread shaohua.li at inf dot ethz.ch
https://sourceware.org/bugzilla/show_bug.cgi?id=28645

Bug ID: 28645
   Summary: Assertion `(p) <= (limit)' failed.
   Product: binutils
   Version: 2.38 (HEAD)
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: binutils
  Assignee: unassigned at sourceware dot org
  Reporter: shaohua.li at inf dot ethz.ch
  Target Milestone: ---

Created attachment 13814
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13814&action=edit
assertion_poc

Hi there,

I crashed `readelf -w` with a fuzzer-generated input. The cause is a failing
assertion.

- Compiler: clang-13

- Platform: Ubuntu 20.04.4 LTS, x86_64

- Reproduce: `readelf -w assertion_poc`

- Raw Output: 
`
readelf: ./dwarf.c:10599: int process_cu_tu_index(struct dwarf_section *, int):
Assertion `(p) <= (limit)' failed.
Aborted (core dumped)

`

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


[Bug binutils/28645] Assertion `(p) <= (limit)' failed.

2021-12-02 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28645

Nick Clifton  changed:

   What|Removed |Added

   Assignee|unassigned at sourceware dot org   |nickc at redhat dot com
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2021-12-02
 CC||nickc at redhat dot com
 Ever confirmed|0   |1

--- Comment #1 from Nick Clifton  ---
Working on it.

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


[Bug binutils/28645] Assertion `(p) <= (limit)' failed.

2021-12-02 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=28645

--- Comment #2 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nick Clifton :

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

commit 117e35f51972acd1f29fd249ef20343258ef5256
Author: Nick Clifton 
Date:   Thu Dec 2 17:48:20 2021 +

Fix illegal memory access whilst parsing corrupt DWARF debug information.

PR 28645
* dwarf.c (process_cu_tu_index): Add test for overruning section
whilst processing slots.

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


[Bug binutils/28645] Assertion `(p) <= (limit)' failed.

2021-12-02 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28645

Nick Clifton  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Nick Clifton  ---
I have checked in a small patch to fix this problem.

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