[Bug gas/2724] New: GAS segmentation fault when target=coff and enabled-target=elf

2006-06-01 Thread ed dot reed at aesec dot com
When binutils is configured with --target=i386-aesec-coff
--enabled-target=i386-elf (or i586-linux or variations thereon), and

you run "gas/as-new -v"
you get the version string, followed by a segmentation fault

Configuration command:
../binutils-2.16.1/configure --target=i386-coff --enable-targets=i586-linux

and build the system, then run the new gas with -v:

[EMAIL PROTECTED]:/d1/box/obj-binutils-current> gas/as-new -v
GNU assembler version 2.16.1 (i386-coff) using BFD version 2.16.1
Segmentation fault

Looking through gdb:

[EMAIL PROTECTED]:/d1/box/obj-binutils-current> gdb gas/as-new
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-suse-linux"...Using host libthread_db library
"/lib/tls/libthread_db.so.1".

(gdb) run -v
Starting program: /d1/box/obj-binutils-2.16.1/gas/as-new -v
GNU assembler version 2.16.1 (i386-coff) using BFD version 2.16.1

Program received signal SIGSEGV, Segmentation fault.
coff_new_section_hook (abfd=0x80ed3e8, section=0x80d56a0) at coffcode.h:1602
1602  coffsymbol (section->symbol)->native = native;
(gdb)  print (section->symbol)
$1 = (struct bfd_symbol *) 0x80ce550
(gdb) print *(section->symbol)
$2 = {the_bfd = 0x0, name = 0x80b5370 "*ABS*", value = 0, flags = 256, section =
0x80d56a0, udata = {p = 0x0, i = 0}}
(gdb)   

By stepping through the debugger prior to the segfault, I can see the .text and
.data sections passing this line of code with no issues.  But the second time it
is called with *ABS* section, it horks.

I'm guessing that as is trying to setup section headers and symbol tables
getting ready for source code input, and trying to set up ELF-things, which is
causing some consternation in coffcode.h.

I haven't a clue as to where to tell as to not bother trying to set up ELF
section headers for the default COFF output target.

I've tried this on binutils versions 2.15, 2.16 and 2.16.1

It's annoying.  I'd like to have binutils assume COFF, but be able to handle
ELF, and this is the only glitch I've found, so far.

Thanks,
Ed

-- 
   Summary: GAS segmentation fault when target=coff and enabled-
target=elf
   Product: binutils
   Version: 2.16
Status: NEW
  Severity: normal
  Priority: P2
     Component: gas
    AssignedTo: unassigned at sources dot redhat dot com
    ReportedBy: ed dot reed at aesec dot com
CC: bug-binutils at gnu dot org,ed dot reed at aesec dot com
 GCC build triplet: i586-suse-linux
  GCC host triplet: i586-suse-linux
GCC target triplet: i386-coff


http://sourceware.org/bugzilla/show_bug.cgi?id=2724

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/2724] GAS segmentation fault when target=coff and enabled-target=elf

2006-08-02 Thread ed dot reed at aesec dot com

--- Additional Comments From ed dot reed at aesec dot com  2006-08-02 21:09 
---
I've retested this with binutils-2.17 and it has the same problem.

Configuration is:
==
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host dell450:
#
# src/configure  --prefix=/usr/local/binutils-2.17-coff+elf32 --target=i386-coff
--enable-targets=i586-elf

==
It compiles and builds cleanly (gcc = 4.1.0, SuSE distribution).

Running gas/as-new with no command line arguments results in a segfault.  Normal
behavior is to sit awaiting source lines from standard input until a ctl-D.

Configuring without the --enable-targets=i586-elf bit produces as-new which does
not segfault, but sits awaiting soure lines from standard input.

So, the problem still exists.

-- 
   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |
Version|2.16|2.17


http://sourceware.org/bugzilla/show_bug.cgi?id=2724

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gas/2724] GAS segmentation fault when target=coff and enabled-target=elf

2006-08-07 Thread ed dot reed at aesec dot com

--- Additional Comments From ed dot reed at aesec dot com  2006-08-07 20:31 
---
Thanks, that did the trick.

I didn't change it to "fixed" because I don't know if I'm supposed to or not -
but it (gas - the specific thing I reported) now works for me with i386-coff as
the default target and i386-linux among the enabled targets.

# src/configure  --prefix=/usr/local/binutils-2.17-coff+elf32 --target=i386-coff
--enable-targets=i386-linux,x86_64-linux,i386-linuxaout

and the utilities recognize both COFF and ELF object files correctly.

Ed

-- 
   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||WORKSFORME


http://sourceware.org/bugzilla/show_bug.cgi?id=2724

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils