[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/29802] New: Segmentation fault in _bfd_elf_strtab_add
From: |
danglin at gcc dot gnu.org |
Subject: |
[Bug ld/29802] New: Segmentation fault in _bfd_elf_strtab_add |
Date: |
Thu, 17 Nov 2022 23:53:33 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=29802
Bug ID: 29802
Summary: Segmentation fault in _bfd_elf_strtab_add
Product: binutils
Version: 2.39
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: danglin at gcc dot gnu.org
Target Milestone: ---
Host: hppa64-hp-hpux11.11
Target: hppa64-hp-hpux11.11
Build: hppa64-hp-hpux11.11
I've been working on getting 64-bit GNU ld on hppa64-hpux to work with
gcc. I hit a segmentation fault linking libquadmath in _bfd_elf_strtab_add:
bash-5.1$ gdb -c core /opt/gnu64/bin/ld
GNU gdb (GDB) 7.11.50.20160723-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "hppa64-hp-hpux11.11".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/gnu64/bin/ld...done.
[New <main task>]
warning: Private mapping of shared library text was not specified
by the executable; setting a breakpoint in a shared library which
is not privately mapped will not work. See the HP-UX 11i v3 chatr
manpage for methods to privately map shared library text.
Unable to modify dynamic linker flags.
(gdb) bt
#0 0x400000000010cf7c in _bfd_elf_strtab_add (tab=0x8000000100050228,
str=0x0, copy=false) at ../../src/bfd/elf-strtab.c:150
#1 0x40000000000fa1b4 in bfd_elf_link_record_local_dynamic_symbol (
info=0x800000010001b238 <link_info>, input_bfd=0x80000001001db158,
input_indx=-9223372032559480280) at ../../src/bfd/elflink.c:841
#2 0x40000000000cfeb4 in allocate_global_data_dlt (eh=0x80000001001db158,
data=0x8000000100050228) at ../../src/bfd/elf64-hppa.c:974
#3 0x40000000000bcb50 in bfd_link_hash_traverse (htab=0x800000010004e888,
func=0x8000000100050228, info=0x0) at ../../src/bfd/linker.c:671
#4 0x40000000000d119c in elf_link_hash_traverse (info=0x800003ffbfff21e8,
f=<optimized out>, table=0x8000000100050228) at ../../src/bfd/elf-bfd.h:749
#5 elf64_hppa_size_dynamic_sections (output_bfd=0x0, info=0x80000001001db158)
at ../../src/bfd/elf64-hppa.c:1702
#6 0x40000000001000f0 in bfd_elf_size_dynamic_sections (
output_bfd=0x800000010001b238 <link_info>, soname=<optimized out>,
rpath=0x0, filter_shlib=0x0, audit=0x0, depaudit=0x0,
auxiliary_filters=<optimized out>, info=0x8000000100050228,
sinterpptr=<optimized out>) at ../../src/bfd/elflink.c:7398
#7 0x40000000000ac5f4 in ldelf_before_allocation (
audit=0x800000010001b238 <link_info> "\300,\001H\004@A\206",
depaudit=<optimized out>,
default_interpreter_name=0xffffffffffffffff <error: Cannot access memory at
address 0xffffffffffffffff>) at ../../src/ld/ldelf.c:1835
#8 0x40000000000a8048 in gldelf64hppa_before_allocation () at eelf64hppa.c:102
#9 0x40000000000a06d8 in ldemul_before_allocation ()
at ../../src/ld/ldemul.c:96
#10 0x4000000000096fb4 in lang_process () at ../../src/ld/ldlang.c:8318
#11 0x400000000017b8e8 in main (argc=<optimized out>, argv=<optimized out>)
at ../../src/ld/ldmain.c:497
Problem is str=0x0. If I return 0 when str is NULL, libquadmath will link
successfully. Whether it works is another matter. Probably, there's a better
fix.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/29802] New: Segmentation fault in _bfd_elf_strtab_add,
danglin at gcc dot gnu.org <=
- [Bug ld/29802] Segmentation fault in _bfd_elf_strtab_add, amodra at gmail dot com, 2022/11/18
- [Bug ld/29802] Segmentation fault in _bfd_elf_strtab_add, dave.anglin at bell dot net, 2022/11/18
- [Bug ld/29802] Segmentation fault in _bfd_elf_strtab_add, dave.anglin at bell dot net, 2022/11/18
- [Bug ld/29802] Segmentation fault in _bfd_elf_strtab_add, danglin at gcc dot gnu.org, 2022/11/18
- [Bug ld/29802] Segmentation fault in _bfd_elf_strtab_add, danglin at gcc dot gnu.org, 2022/11/19
- [Bug ld/29802] Segmentation fault in _bfd_elf_strtab_add, danglin at gcc dot gnu.org, 2022/11/19
- [Bug ld/29802] Segmentation fault in _bfd_elf_strtab_add, danglin at gcc dot gnu.org, 2022/11/19