bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/21180] New: ld segfault for microblaze when --gc-sections is use


From: wbx at openadk dot org
Subject: [Bug ld/21180] New: ld segfault for microblaze when --gc-sections is used
Date: Sat, 18 Feb 2017 07:48:47 +0000

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

            Bug ID: 21180
           Summary: ld segfault for microblaze when --gc-sections is used
           Product: binutils
           Version: 2.29 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: wbx at openadk dot org
  Target Milestone: ---

The buildroot autobuilders found two packages which are failing to compile for
microblaze, because ld segfaults. This happens with binutils 2.26.1, but can be
reproduced with binutils git from today.

The packages are nss and kmod (when python support is enabled).

Backtrace for nss with binutils 2.26.1:
gdb ./output/host/usr/bin/microblazeel-linux-ld.bfd
./output/build/libnss-3.27.2/nss/lib/freebl/core
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 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 "x86_64-linux-gnu".
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 ./output/host/usr/bin/microblazeel-linux-ld.bfd...(no
debugging symbols found)...done.

warning: core file may not match specified executable file.
[New LWP 7756]
Core was generated by
`/home/wbx/buildroot/output/host/usr/lib/gcc/microblazeel-buildroot-linux-uclibc'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000043b4a4 in microblaze_elf_finish_dynamic_symbol ()
(gdb) bt
#0  0x000000000043b4a4 in microblaze_elf_finish_dynamic_symbol ()
#1  0x0000000000453e94 in elf_link_output_extsym ()
#2  0x000000000042d591 in bfd_hash_traverse ()
#3  0x00000000004628ba in bfd_elf_final_link ()
#4  0x0000000000418966 in ldwrite ()
#5  0x00000000004038c9 in main ()
(gdb) info reg
rax            0xe8fac  954284
rbx            0x15f1220        23007776
rcx            0x70c680 7390848
rdx            0x18025d8        25175512
rsi            0x9c     156
rdi            0x0      0
rbp            0x15f3600        0x15f3600
rsp            0x7ffd7257eb40   0x7ffd7257eb40
r8             0x8040   32832
r9             0x99d64  630116
r10            0x1      1
r11            0x1      1
r12            0x16022c8        23077576
r13            0x16023f8        23077880
r14            0x17ac6f8        24823544
r15            0x706880 7366784
rip            0x43b4a4 0x43b4a4 <microblaze_elf_finish_dynamic_symbol+1012>
eflags         0x10246  [ PF ZF IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0
(gdb) disassemble 
...
   0x000000000043b48a <+986>:   callq  0x42a0b0 <bfd_assert>
   0x000000000043b48f <+991>:   jmpq   0x43b13f
<microblaze_elf_finish_dynamic_symbol+143>
   0x000000000043b494 <+996>:   nopl   0x0(%rax)
   0x000000000043b498 <+1000>:  mov    0x28(%r14),%rdx
   0x000000000043b49c <+1004>:  mov    0x30(%r14),%rsi
   0x000000000043b4a0 <+1008>:  mov    0x68(%rdx),%rdi
---Type <return> to continue, or q <return> to quit---
=> 0x000000000043b4a4 <+1012>:  add    0x28(%rdi),%rsi
   0x000000000043b4a8 <+1016>:  add    0x60(%rdx),%rsi
   0x000000000043b4ac <+1020>:  mov    0x88(%r12),%edx
   0x000000000043b4b4 <+1028>:  lea    0x1(%rdx),%edi
   0x000000000043b4b7 <+1031>:  mov    %edi,0x88(%r12)
   0x000000000043b4bf <+1039>:  mov    0xb0(%r12),%rdi
   0x000000000043b4c7 <+1047>:  mov    %rax,0x30(%rsp)
   0x000000000043b4cc <+1052>:  movq   $0x10,0x38(%rsp)
   0x000000000043b4d5 <+1061>:  mov    %edx,%eax
   0x000000000043b4d7 <+1063>:  mov    %rsi,0x40(%rsp)
   0x000000000043b4dc <+1068>:  jmpq   0x43b349
<microblaze_elf_finish_dynamic_symbol+665>
   0x000000000043b4e1 <+1073>:  nopl   0x0(%rax)
   0x000000000043b4e8 <+1080>:  mov    $0xc92,%esi
   0x000000000043b4ed <+1085>:  mov    $0x4de331,%edi
   0x000000000043b4f2 <+1090>:  callq  0x42a0b0 <bfd_assert>

   0x000000000043b48a <+986>:   callq  0x42a0b0 <bfd_assert>
   0x000000000043b48f <+991>:   jmpq   0x43b13f
<microblaze_elf_finish_dynamic_symbol+143>
   0x000000000043b494 <+996>:   nopl   0x0(%rax)
   0x000000000043b498 <+1000>:  mov    0x28(%r14),%rdx
   0x000000000043b49c <+1004>:  mov    0x30(%r14),%rsi
   0x000000000043b4a0 <+1008>:  mov    0x68(%rdx),%rdi
---Type <return> to continue, or q <return> to quit---
=> 0x000000000043b4a4 <+1012>:  add    0x28(%rdi),%rsi
   0x000000000043b4a8 <+1016>:  add    0x60(%rdx),%rsi
   0x000000000043b4ac <+1020>:  mov    0x88(%r12),%edx
   0x000000000043b4b4 <+1028>:  lea    0x1(%rdx),%edi
   0x000000000043b4b7 <+1031>:  mov    %edi,0x88(%r12)
   0x000000000043b4bf <+1039>:  mov    0xb0(%r12),%rdi
   0x000000000043b4c7 <+1047>:  mov    %rax,0x30(%rsp)
   0x000000000043b4cc <+1052>:  movq   $0x10,0x38(%rsp)
   0x000000000043b4d5 <+1061>:  mov    %edx,%eax
   0x000000000043b4d7 <+1063>:  mov    %rsi,0x40(%rsp)
   0x000000000043b4dc <+1068>:  jmpq   0x43b349
<microblaze_elf_finish_dynamic_symbol+665>
   0x000000000043b4e1 <+1073>:  nopl   0x0(%rax)
   0x000000000043b4e8 <+1080>:  mov    $0xc92,%esi
   0x000000000043b4ed <+1085>:  mov    $0x4de331,%edi
   0x000000000043b4f2 <+1090>:  callq  0x42a0b0 <bfd_assert>
...

Removing --gc-sections from LDFLAGS/CFLAGS let the linking work.

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