bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/29802] Segmentation fault in _bfd_elf_strtab_add


From: danglin at gcc dot gnu.org
Subject: [Bug ld/29802] Segmentation fault in _bfd_elf_strtab_add
Date: Sat, 19 Nov 2022 19:32:53 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=29802

--- Comment #5 from John David Anglin <danglin at gcc dot gnu.org> ---
libtool: link: /home/dave/gnu/gcc/objdir64/./gcc/xgcc
-B/home/dave/gnu/gcc/objdi
r64/./gcc/ -B/opt/gnu64/gcc_gld/gcc-13/hppa64-hp-hpux11.11/bin/
-B/opt/gnu64/gcc
_gld/gcc-13/hppa64-hp-hpux11.11/lib/ -isystem
/opt/gnu64/gcc_gld/gcc-13/hppa64-h
p-hpux11.11/include -isystem
/opt/gnu64/gcc_gld/gcc-13/hppa64-hp-hpux11.11/sys-i
nclude    -shared  math/.libs/x2y2m1q.o math/.libs/acoshq.o math/.libs/fmodq.o
m
ath/.libs/acosq.o math/.libs/frexpq.o math/.libs/rem_pio2q.o
math/.libs/asinhq.o
 math/.libs/hypotq.o math/.libs/remainderq.o math/.libs/asinq.o
math/.libs/rintq
.o math/.libs/atan2q.o math/.libs/isinfq.o math/.libs/roundq.o
math/.libs/atanhq
.o math/.libs/isnanq.o math/.libs/scalblnq.o math/.libs/atanq.o
math/.libs/j0q.o math/.libs/scalbnq.o math/.libs/cbrtq.o math/.libs/j1q.o
math/.libs/signbitq.o math/.libs/ceilq.o math/.libs/jnq.o
math/.libs/sincos_table.o math/.libs/complex.o math/.libs/ldexpq.o
math/.libs/sincosq.o math/.libs/copysignq.o math/.libs/lgammaq.o
math/.libs/sincosq_kernel.o math/.libs/coshq.o math/.libs/llroundq.o
math/.libs/sinhq.o math/.libs/cosq.o math/.libs/log10q.o math/.libs/sinq.o
math/.libs/cosq_kernel.o math/.libs/log1pq.o math/.libs/sinq_kernel.o
math/.libs/erfq.o math/.libs/logq.o math/.libs/sqrtq.o math/.libs/expm1q.o
math/.libs/lroundq.o math/.libs/tanhq.o math/.libs/expq.o math/.libs/modfq.o
math/.libs/tanq.o math/.libs/fabsq.o math/.libs/nanq.o math/.libs/tgammaq.o
math/.libs/finiteq.o math/.libs/nextafterq.o math/.libs/truncq.o
math/.libs/floorq.o math/.libs/powq.o math/.libs/fmaq.o math/.libs/logbq.o
math/.libs/exp2q.o math/.libs/issignalingq.o math/.libs/lgammaq_neg.o
math/.libs/lgammaq_product.o math/.libs/tanq_kernel.o
math/.libs/tgammaq_product.o math/.libs/casinhq_kernel.o math/.libs/cacoshq.o
math/.libs/cacosq.o math/.libs/casinhq.o math/.libs/casinq.o
math/.libs/catanhq.o math/.libs/catanq.o math/.libs/cimagq.o math/.libs/conjq.o
math/.libs/cprojq.o math/.libs/crealq.o math/.libs/fdimq.o math/.libs/fmaxq.o
math/.libs/fminq.o math/.libs/ilogbq.o math/.libs/llrintq.o math/.libs/log2q.o
math/.libs/lrintq.o math/.libs/nearbyintq.o math/.libs/remquoq.o
math/.libs/ccoshq.o math/.libs/cexpq.o math/.libs/clog10q.o math/.libs/clogq.o
math/.libs/csinq.o math/.libs/csinhq.o math/.libs/csqrtq.o math/.libs/ctanq.o
math/.libs/ctanhq.o printf/.libs/addmul_1.o printf/.libs/add_n.o
printf/.libs/cmp.o printf/.libs/divrem.o printf/.libs/flt1282mpn.o
printf/.libs/fpioconst.o printf/.libs/lshift.o printf/.libs/mul_1.o
printf/.libs/mul_n.o printf/.libs/mul.o printf/.libs/printf_fphex.o
printf/.libs/printf_fp.o printf/.libs/quadmath-printf.o printf/.libs/rshift.o
printf/.libs/submul_1.o printf/.libs/sub_n.o strtod/.libs/strtoflt128.o
strtod/.libs/mpn2flt128.o strtod/.libs/tens_in_limb.o   -lm -lc 
-Wl,--version-script=../../../gcc/libquadmath/quadmath.map   -Wl,-soname
-Wl,libquadmath.sl.0 -o .libs/libquadmath.sl.0.0
/opt/gnu64/bin/ld: warning: /lib/pa20_64/libm.sl has a section extending past
end of file
/opt/gnu64/bin/ld: /lib/pa20_64/libm.sl: .dynsym local symbol at index 0 (>=
sh_info of 0)
/opt/gnu64/bin/ld: /lib/pa20_64/libm.sl: .dynsym local symbol at index 1 (>=
sh_info of 0)
/opt/gnu64/bin/ld: /lib/pa20_64/libm.sl: .dynsym local symbol at index 2 (>=
sh_info of 0)
/opt/gnu64/bin/ld: /lib/pa20_64/libm.sl: .dynsym local symbol at index 3 (>=
sh_info of 0)
/opt/gnu64/bin/ld: warning: /lib/pa20_64/libc.sl has a section extending past
end of file
/opt/gnu64/bin/ld: /lib/pa20_64/libc.sl: .dynsym local symbol at index 0 (>=
sh_info of 0)
/opt/gnu64/bin/ld: /lib/pa20_64/libc.sl: .dynsym local symbol at index 1 (>=
sh_info of 0)
/opt/gnu64/bin/ld: /lib/pa20_64/libc.sl: .dynsym local symbol at index 2 (>=
sh_info of 0)
/opt/gnu64/bin/ld: /lib/pa20_64/libc.sl: .dynsym local symbol at index 3 (>=
sh_info of 0)
/opt/gnu64/bin/ld: math/.libs/sincos_table.o: invalid string offset 58 >= 32
for section `.strtab'
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core
dumped
compilation terminated.
make[3]: *** [Makefile:829: libquadmath.la] Error 1

(gdb) frame 1
#1  0x40000000000fa1b4 in bfd_elf_link_record_local_dynamic_symbol (
    info=0x800000010001b238 <link_info>, input_bfd=0x80000001001db158,
    input_indx=44) at ../../src/bfd/elflink.c:841
841       dynstr_index = _bfd_elf_strtab_add (dynstr, name, false);
(gdb) p *entry
$1 = {next = 0x0, input_bfd = 0x0, input_indx = 0, dynindx = 0, isym = {
    st_value = 64, st_size = 0, st_name = 58, st_info = 0 '\000',
    st_other = 0 '\000', st_target_internal = 0 '\000', st_shndx = 4}}

bash-5.1$ readelf -at
./hppa64-hp-hpux11.11/libquadmath/math/.libs/sincos_table.o
ELF Header:
  Magic:   7f 45 4c 46 02 02 01 01 01 00 00 00 00 00 00 00
  Class:                             ELF64
  Data:                              2's complement, big endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - HP-UX
  ABI Version:                       1
  Type:                              REL (Relocatable file)
  Machine:                           HPPA
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          0 (bytes into file)
  Start of section headers:          6752 (bytes into file)
  Flags:                             0x90214, PA-RISC 2.0, trapnil, wide
  Size of this header:               64 (bytes)
  Size of program headers:           0 (bytes)
  Number of program headers:         0
  Size of section headers:           64 (bytes)
  Number of section headers:         17
  Section header string table index: 16

Section Headers:
  [Nr] Name
       Type              Address          Offset            Link
       Size              EntSize          Info              Align
       Flags
  [ 0]
       NULL             0000000000000000  0000000000000000  0
       0000000000000000 0000000000000000  0                 0
       [0000000000000000]:
  [ 1] .text
       PROGBITS         0000000000000000  0000000000000040  0
       0000000000000000 0000000000000000  0                 1
       [0000000000000006]: ALLOC, EXEC
  [ 2] .data
       PROGBITS         0000000000000000  0000000000000040  0
       0000000000000000 0000000000000000  0                 1
       [0000000000000003]: WRITE, ALLOC
  [ 3] .bss
       NOBITS           0000000000000000  0000000000000040  0
       0000000000000000 0000000000000000  0                 1
       [0000000000000003]: WRITE, ALLOC
  [ 4] .note
       NOTE             0000000000000000  0000000000000040  0
       0000000000000014 0000000000000000  0                 4
       [0000000000000000]:
  [ 5] .rodata
       PROGBITS         0000000000000000  0000000000000060  0
       00000000000014c0 0000000000000000  0                 16
       [0000000000000002]: ALLOC
  [ 6] .debug_info
       PROGBITS         0000000000000000  0000000000001520  0
       00000000000001cf 0000000000000000  0                 1
       [0000000000000000]:
  [ 7] .rela.debug_info
       RELA             0000000000000000  0000000000001970  14
       0000000000000048 0000000000000018  6                 8
       [0000000000000040]: INFO LINK
  [ 8] .debug_abbrev
       PROGBITS         0000000000000000  00000000000016ef  0
       0000000000000047 0000000000000000  0                 1
       [0000000000000000]:
  [ 9] .debug_aranges
       PROGBITS         0000000000000000  0000000000001736  0
       0000000000000020 0000000000000000  0                 1
       [0000000000000000]:
  [10] .rela.debug_aranges
       RELA             0000000000000000  00000000000019b8  14
       0000000000000018 0000000000000018  9                 8
       [0000000000000040]: INFO LINK
  [11] .debug_line
       PROGBITS         0000000000000000  0000000000001756  0
       000000000000004d 0000000000000000  0                 1
       [0000000000000000]:
  [12] .debug_str
       PROGBITS         0000000000000000  00000000000017a3  0
       0000000000000000 0000000000000000  0                 1
       [0000000000000000]:
  [13] .comment
       PROGBITS         0000000000000000  00000000000017a3  0
       0000000000000058 0000000000000001  0                 1
       [0000000000000030]: MERGE, STRINGS
  [14] .symtab
       SYMTAB           0000000000000000  0000000000001800  15
       0000000000000150 0000000000000018  13                8
       [0000000000000000]:
  [15] .strtab
       STRTAB           0000000000000000  0000000000001950  0
       0000000000000020 0000000000000000  0                 1
       [0000000000000000]:
  [16] .shstrtab
       STRTAB           0000000000000000  00000000000019d0  0
       000000000000008d 0000000000000000  0                 1
       [0000000000000000]:

There are no section groups in this file.

There are no program headers in this file.

There is no dynamic section in this file.

Relocation section '.rela.debug_info' at offset 0x1970 contains 3 entries:
  Offset          Info           Type           Sym. Value    Sym. Name +
Addend
000000000006  000700000029 R_PARISC_SECREL32 0000000000000000 .debug_abbrev + 0
0000000000d1  000900000029 R_PARISC_SECREL32 0000000000000000 .debug_line + 0
0000000001c6  000d00000050 R_PARISC_DIR64    0000000000000000 __sincosq_table +
0

Relocation section '.rela.debug_aranges' at offset 0x19b8 contains 1 entry:
  Offset          Info           Type           Sym. Value    Sym. Name +
Addend
000000000006  000600000029 R_PARISC_SECREL32 0000000000000000 .debug_info + 0

There are no unwind sections in this file.

Symbol table '.symtab' contains 14 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS sincos_table.c
     2: 0000000000000000     0 SECTION LOCAL  DEFAULT    1 .text
     3: 0000000000000000     0 SECTION LOCAL  DEFAULT    2 .data
     4: 0000000000000000     0 SECTION LOCAL  DEFAULT    3 .bss
     5: 0000000000000000     0 SECTION LOCAL  DEFAULT    5 .rodata
     6: 0000000000000000     0 SECTION LOCAL  DEFAULT    6 .debug_info
     7: 0000000000000000     0 SECTION LOCAL  DEFAULT    8 .debug_abbrev
     8: 0000000000000000     0 SECTION LOCAL  DEFAULT    9 .debug_aranges
     9: 0000000000000000     0 SECTION LOCAL  DEFAULT   11 .debug_line
    10: 0000000000000000     0 SECTION LOCAL  DEFAULT   12 .debug_str
    11: 0000000000000000     0 SECTION LOCAL  DEFAULT    4 .note
    12: 0000000000000000     0 SECTION LOCAL  DEFAULT   13 .comment
    13: 0000000000000000  5312 OBJECT  GLOBAL DEFAULT    5 __sincosq_table

No version information found in this file.

Displaying notes found in: .note
  Owner                Data size        Description
  01.01                0x00000000       NT_VERSION (version)

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]