This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/38231] New: Improperly parsing -g -o causes bad info to be passed to ld on FreeBSD and ld segfaults
- From: "yanegomi at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Nov 2008 01:25:41 -0000
- Subject: [Bug c/38231] New: Improperly parsing -g -o causes bad info to be passed to ld on FreeBSD and ld segfaults
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I was in a hurry and passed the wrong arguments to gcc and this is what
happened (proper execution would have been: `gcc -g -o ft format_test.c'):
[gcooper@optimus ~]$ gcc -o -g ft format_test.c
ft(.data+0x8): multiple definition of `__dso_handle'
/usr/lib/crtbegin.o(.data+0x0): first defined here
ft(.init+0x0): In function `_init':
/usr/src/lib/csu/amd64/crti.S:31: multiple definition of `_init'
/usr/lib/crti.o(.init+0x0):/usr/src/lib/csu/amd64/crti.S:31: first defined here
ft(.data+0x0): multiple definition of `__progname'
/usr/lib/crt1.o(.data+0x0):/usr/src/lib/csu/amd64/crt1.c:61: first defined here
ft(.text+0x0): In function `_start':
/usr/src/lib/csu/amd64/crt1.c:61: multiple definition of `_start'
/usr/lib/crt1.o(.text+0x0):/usr/src/lib/csu/amd64/crt1.c:61: first defined here
ft(.fini+0x0): In function `_fini':
/usr/src/lib/csu/amd64/crti.S:38: multiple definition of `_fini'
/usr/lib/crti.o(.fini+0x0): first defined here
/var/tmp//ccHhrlAz.o(.text+0x0): In function `main':
: multiple definition of `main'
ft(.text+0x100): first defined here
/usr/lib/crt1.o(.dynamic+0x0): In function `_start':
/usr/src/lib/csu/amd64/crt1.c:61: multiple definition of `_DYNAMIC'
ft(.dynamic+0x0): first defined here
/usr/lib/crt1.o(.got.plt+0x0): In function `_start':
/usr/src/lib/csu/amd64/crt1.c:61: multiple definition of
`_GLOBAL_OFFSET_TABLE_'
ft(.got+0x0): first defined here
gcc: Internal error: Segmentation fault: 11 (program ld)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
[gcooper@optimus ~]$ ld --version
GNU ld version 2.15 [FreeBSD] 2004-05-23
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
This doesn't occur with gcc v4.3.0 and the version of ld released with Fedora
9.
--
Summary: Improperly parsing -g -o causes bad info to be passed to
ld on FreeBSD and ld segfaults
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: trivial
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: yanegomi at gmail dot com
GCC build triplet: amd64-undermydesk-freebsd
GCC host triplet: amd64-undermydesk-freebsd
GCC target triplet: amd64-undermydesk-freebsd
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38231