This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

avr-gas core dumps in S_SET_SEGMENT ...


 Hello,

 I am trying to build the latest AVR - GCC / Binutils / AVR lib from the
CVS repositories. (host build is RH 7.1 x86)

 I know this is work in progress but I keep running into the same issue
with the AVR gas assembler, during the library compilation the gas
program core dumps.
 From a simple gdb session it looks like S_SET_SEGMENT is called with a
null pointer as a second argument from symbols.c:1157 in
resolve_symbol_value. (see gdb session below)
 Now, I don't have enough knowledge to go further ... can anybody help ?

 Here is the more detailed description of the issue :

Configure / make / make install for binutils : no problem
Configure / make  : fails with the following error :


 Here is the gcc command (with -v -save-temp parameters added)

[gcc]$ /home/florrain/linux-avr/gcc/gcc/xgcc
-B/home/florrain/linux-avr/gcc/gcc/ -B/usr/local/avr/bin/
-B/usr/local/avr/lib/ -isystem /usr/local/avr/include -O2
-DCROSS_COMPILE -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes

-Wmissing-prototypes -isystem ./include  -DDF=SF -Dinhibit_libc
-mcall-prologues -g1  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-Dinhibit_libc -I. -I. -I. -I./. -I./config -I./../include -DL_divmodhi4

-xassembler-with-cpp -save-temps -v -c ./config/avr/libgcc.S -o
libgcc/./_divmodhi4.o
Reading specs from /home/florrain/linux-avr/gcc/gcc/specs
Configured with: ./configure --host=i686-pc-linux-gnu --disable-nls
--enable-languages=c --target=avr : (reconfigured)  : (reconfigured)  :
(reconfigured)  : (reconfigured)  : (reconfigured)
gcc version 3.1 20010425 (experimental)
 /home/florrain/linux-avr/gcc/gcc/cpp0 -lang-asm -v -I. -I. -I. -I./.
-I./config -I./../include -iprefix
/home/florrain/linux-avr/gcc/gcc/../lib/gcc-lib/avr/3.1/ -isystem
/home/florrain/linux-avr/gcc/gcc/include -isystem
/usr/local/avr/bin/include -isystem /usr/local/avr/lib/include
-D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=0 -DAVR -D__AVR__
-D__AVR -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -D__AVR_ARCH__=2
-D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -D__INT_MAX__=32767
-DCROSS_COMPILE -DIN_GCC -DDF=SF -Dinhibit_libc -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -DL_divmodhi4 -isystem
/usr/local/avr/include -isystem ./include ./config/avr/libgcc.S -o
libgcc.s
ignoring nonexistent directory "/usr/local/avr/bin/include"
ignoring nonexistent directory "/usr/local/avr/lib/include"
ignoring nonexistent directory "/usr/local/avr/include"
GNU CPP version 3.1 20010425 (experimental) (cpplib) (GNU assembler
syntax)
ignoring nonexistent directory
"/home/florrain/linux-avr/gcc/lib/gcc-lib/avr/3.1/include"
ignoring nonexistent directory
"/home/florrain/linux-avr/gcc/lib/gcc-lib/avr/3.1/../../../../avr/sys-include"

ignoring nonexistent directory
"/home/florrain/linux-avr/gcc/lib/gcc-lib/avr/3.1/../../../../avr/include"

ignoring nonexistent directory "/usr/local/lib/gcc-lib/avr/3.1/include"
ignoring nonexistent directory
"/usr/local/lib/gcc-lib/avr/3.1/../../../../avr/sys-include"
ignoring nonexistent directory
"/usr/local/lib/gcc-lib/avr/3.1/../../../../avr/include"
ignoring duplicate directory "."
ignoring duplicate directory "."
ignoring duplicate directory "."
ignoring duplicate directory "include"
#include "..." search starts here:
#include <...> search starts here:
 .
 config
 ../include
 /home/florrain/linux-avr/gcc/gcc/include
End of search list.
 /usr/local/avr/bin/as -o libgcc/./_divmodhi4.o libgcc.s
xgcc: Internal error: Segmentation fault (program as)
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

 Here is the GDB output :

[gcc]$ gdb /usr/local/avr/bin/as
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 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 "i386-redhat-linux"...
Breakpoint 1 at 0x8049324
.gdbinit:3: Error in sourced command file:
./gdbinit.in:92: Error in sourced command file:
Function "fancy_abort" not defined.
(gdb) set args -o libgcc/./_divmodhi4.o libgcc.s
(gdb) r
Starting program: /usr/local/avr/bin/as -o libgcc/./_divmodhi4.o
libgcc.s
Breakpoint 1 at 0x400521b8: file exit.c, line 40.

Program received signal SIGSEGV, Segmentation fault.
S_SET_SEGMENT (s=0x80ad6bc, seg=0x0) at symbols.c:1813
1813        s->bsym->section = seg;
(gdb) l 1800
1795
1796      if (LOCAL_SYMBOL_CHECK (s))
1797        {
1798          if (seg == reg_section)
1799            s = local_symbol_convert ((struct local_symbol *) s);
1800          else
1801            {
1802              ((struct local_symbol *) s)->lsy_section = seg;
1803              return;
1804            }
(gdb)
1805        }
1806
1807      if (s->bsym->flags & BSF_SECTION_SYM)
1808        {
1809          if (s->bsym->section != seg)
1810            abort ();
1811        }
1812      else
1813        s->bsym->section = seg;
1814    }
(gdb)
(gdb) bt
#0  S_SET_SEGMENT (s=0x80ad6bc, seg=0x0) at symbols.c:1813
#1  0x0805b222 in resolve_symbol_value (symp=0x80ad6bc, finalize=2) at
symbols.c:1157
#2  0x0805ddbc in write_object_file () at write.c:1953
#3  0x0804b350 in main (argc=2, argv=0x809e390) at as.c:909
#4  0x4003e177 in __libc_start_main (main=0x804b1b0 <main>, argc=4,
ubp_av=0xbffffacc, init=0x8048f7c <_init>, =0x8083b20 <_fini>,
rtld_fini=0x4000e184
<_dl_fini>,
    stack_end=0xbffffabc) at ../sysdeps/generic/libc-start.c:129



--
  Francois Lorrain



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]