call_gmon_start () 에러가 발생 합니다. 해결책에 대한 문의 입
안녕하세요.
다음과 같은 test program 을 mips 보드에서 돌려 보니 call_gmon_start () 에러가 발생 하네요. 어떻게 해결을 해야 하나요?
*test.c**********************************************
void main(int argc, char **argv) {
printf("CRASH: this program will be crashed right after !! \n");
return;
}
**Makefile *********************************
.SUFFIXES : .c .o
#
# Rules for building the main directory
#
# Setup directories (this will go away later)
CC = gcc
AR = ar
RANLIB = ranlib
AS = as
CFLAGS=-static -shared
#CFLAGS=-g
TOP =$(PWD)
SRC =$(TOP)/src
OBJ =$(TOP)/obj
INC =$(TOP)/inc
# Primary targets for this directory
all:: $(OBJ)/crash
#install-docs::
clean::
cd $(OBJ) ; rm -rf *
MIPS_STK_OBJECTS = $(OBJ)/mipsstack.o
SRCFILES += \
$(SRC)/getstack.c \
$(SRC)/sn_assert.c
OBJFILES =$(SRCFILES:$(SRC)/%.c=$(OBJ)/%.o)
$(OBJ)/libsnutil.a: $(OBJFILES) $(MIPS_STK_OBJECTS)
$(AR) rc $@ $^
$(RANLIB) $@
$(OBJ)/%.o: $(SRC)/%.c
$(CC) $(CFLAGS) -I$(INC) -D__MIPS__ -o $@ $^
$(OBJ)/crash: $(SRC)/test.o $(MIPS_STK_OBJECTS) $(OBJFILES)
$(CC) $(CFLAGS) -I$(INC) -o $@ $^
$(OBJ)/mipsstack.o: $(SRC)/mipsstack.s
$(AS) -KPIC $(SRC)/mipsstack.s -o $(OBJ)/mipsstack.o
** GDB dump ****************************
root@165.213.123.216:~/starent# gdb obj/crash
GNU gdb 6.0 (MontaVista 6.0-8.0.7.0300532 2003-12-24)
Copyright 2003 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 "mips-hardhat-linux"...
(gdb)
(gdb)
(gdb) run
Starting program: /root/starent/obj/crash
Program received signal SIGSEGV, Segmentation fault.
0x555508d4 in call_gmon_start ()
(gdb)
댓글 달기