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

            Bug ID: 19959
           Summary: gold 2.26 incremental link assertion failure at
                    incremental.cc:1651 with -s flag
           Product: binutils
           Version: 2.26
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: steven at uplinklabs dot net
                CC: ian at airs dot com
  Target Milestone: ---

Simple test case:

$ cat test.c
int main(int argc, char **argv) { return 0; }
$ gcc -c test.c
$ gcc -fuse-ld=gold -fno-use-linker-plugin -Wl,--incremental -s -o test test.o
test: stat: No such file or directory
linking with --incremental-full
/usr/bin/ld.gold: internal error in write_info_blocks, at
/build/binutils/src/binutils-gdb/gold/incremental.cc:1651
collect2: error: ld returned 1 exit status

The -s flag results in a symtab_index value of -1, which trips the assertion.

Based on my understanding of how --incremental works, --incremental and -s are
incompatible flags. But this should result in an error message rather than
assertion failure.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to