bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/20443] New: Segfaults with STT_SPARC_REGISTER and --gc-section


From: jrtc27 at jrtc27 dot com
Subject: [Bug gold/20443] New: Segfaults with STT_SPARC_REGISTER and --gc-sections
Date: Fri, 05 Aug 2016 20:56:44 +0000

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

            Bug ID: 20443
           Summary: Segfaults with STT_SPARC_REGISTER and --gc-sections
           Product: binutils
           Version: 2.27
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: jrtc27 at jrtc27 dot com
                CC: ccoutant at gmail dot com, ian at airs dot com
  Target Milestone: ---
              Host: sparc64-linux-gnu

Easy reproduction:

   $ cat main.c
   int main() {
       return 0;
   }
   $ gcc -o main -Wl,--gc-sections main.c
   $ gcc -fuse-ld=gold -o main -Wl,--gc-sections main.c
   collect2: fatal error: ld terminated with signal 11 [Segmentation fault]
   compilation terminated.

This is because res->is_externally_visible is called inside
Symbol_table::add_from_relobj when res is NULL (since this is an
STT_SPARC_REGISTER dummy symbol).

Patch available at
https://www.sourceware.org/ml/binutils/2016-07/msg00321.html.
With this patch I've done the obvious bare minimum to get this to work, but
given these NULLs are floating around now I highly suspect there will be other
places where they crop up.

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