Hi Lu, Liu,

You are both seeing the same problem, that __init_array_end is missing
when you try to load CMPFlex.  The __init_array_end symbol is supposed to
be provided automatically by the linker.  I am not sure why the symbol is
not being defined. I suspect it is a bug in ld, as it should not be
possible to stop ld from emitting the symbol.  Another SimFlex user
reported a similar problem using Fedora Core 3 linux.  We still have not
gotten a Fedora Core box set up here to try to chase this error down.

Please try using the attached makefile.def.  It differs from the file in
the release in that it shuts off the "whole archive" option at the end of
the link command line, which may cause the linker to behave better. You
will need to edit it to put in your paths, as described in the getting
started guide.

Also, please let me know which Linux distribution you are using.

Regards,
-Tom Wenisch
Computer Architecture Lab
Carnegie Mellon University

On Sat, 20 Aug 2005, lu peng wrote:

>
> Hi, Tom,
>
> I encounter another error although I go back to use simics-2.0.28 (because I 
> can't find the simics-2.2.12). Please take a look. Thanks,
>
> Lu
>
> ---------
>
> ./interactive CMPFlex
>
> Starting interactive run of flexus_test with CMPFlex in 
> /home/hsun/lpeng/simflex/flexus/flexus-test-app/runs/hsun-CMPFlex-20Aug05-163336
> Launching job
> Error loading module 'flexus-CMPFlex-v9-iface-gcc': Failed to load module 
> 'flexus-CMPFlex-v9-iface-gcc'
> ('/home/hsun/lpeng/simflex/flexus/flexus-test-app/runs/hsun-CMPFlex-20Aug05-163336/simics/x86-linux/lib/libflexus_CMPFlex_v9_iface_gcc.so'):
> "/home/hsun/lpeng/simflex/flexus/flexus-test-app/runs/hsun-CMPFlex-20Aug05-163336/simics/x86-linux/lib/libflexus_CMPFlex_v9_iface_gcc.so:
>  undefined symbol:
> __init_array_end"
> [load.simics:2] the command did not complete properly; interrupting script
>
>
>
-------------- next part --------------
# DO-NOT-REMOVE begin-copyright-block 
#                                     
# Redistributions of any form whatsoever must retain and/or include the     
# following acknowledgment, notices and disclaimer:                         
#                                                                           
# This product includes software developed by Carnegie Mellon University.   
#                                                                           
# Copyright \(c\) 2005 by Brian Gold, Nikos Hardavellas, Jangwoo Kim,       
# Jared Smolens, Stephen Somogyi, Tom Wenisch, Babak Falsafi and            
# James C. Hoe for the SimFlex Project, Computer Architecture Lab           
# at Carnegie Mellon, Carnegie Mellon University.                           
#                                                                           
# For more information, see the SimFlex project website at:                 
#   http://www.ece.cmu.edu/~simflex                                         
#                                                                           
# You may not use the name Carnegie Mellon University or derivations      
# thereof to endorse or promote products derived from this software.        
#                                                                           
# If you modify the software you must place a notice on or within any       
# modified version provided or made available to any third party stating    
# that you have modified the software.  The notice shall include at least   
# your name, address, phone number, email address and the date and purpose  
# of the modification.                                                      
#                                                                           
# THE SOFTWARE IS PROVIDED AS-IS WITHOUT ANY WARRANTY OF ANY KIND, EITHER 
# EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO ANY WARRANTY  
# THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS OR BE ERROR-FREE AND ANY 
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,  
# TITLE, OR NON-INFRINGEMENT.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY 
# BE LIABLE FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO DIRECT, INDIRECT, 
# SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN   
# ANY WAY CONNECTED WITH THIS SOFTWARE (WHETHER OR NOT BASED UPON WARRANTY, 
# CONTRACT, TORT OR OTHERWISE).                                             
#                                     
# DO-NOT-REMOVE end-copyright-block   
###############################################################################
# Flexus setup
###############################################################################
# You will have to fill in  the MAKE variables in this section to match your
# environment

# GCC 3.4.4 Compiler Settings
GCC_PATH=
GCC_BINARY=

# Boost 1.32.0 path
BOOST_PATH=

# Simics 2.0.28 or 2.2.12 path
SIMICS_PATH=


###############################################################################
# You are unlikely to have to modify variables below here
###############################################################################


# Make control flags
SILENT_MAKE=-s  # Comment this out or change to -d to debug the Makefiles

# Directories
CORE_DIR=$(FLEXUS_ROOT)/core
COMPONENTS_DIR=$(FLEXUS_ROOT)/components
SIMULATORS_DIR=$(FLEXUS_ROOT)/simulators

# Include paths
FLEXUS_INCLUDE=$(FLEXUS_ROOT)
BOOST_INCLUDE=$(BOOST_PATH)

SIMICS_LIB_DIR=$(SIMICS_PATH)/x86-linux/lib
SIMICS_SYSLIB_DIR=$(SIMICS_PATH)/x86-linux/sys/lib
SIMICS_INCLUDE=$(SIMICS_PATH)/x86-linux/obj/include
SIMICS_V9_INCLUDE=$(SIMICS_INCLUDE)/simics
SIMICS_X86_INCLUDE=$(SIMICS_INCLUDE)/simics

INCLUDES=-I$(BOOST_INCLUDE) -I$(FLEXUS_INCLUDE) -I$(SIMICS_INCLUDE) 
BOOST_LIBRARIES=-Wl,-no-whole-archive -lboost_date_time -lboost_regex 
-lboost_serialization -lz

# other constants
# List of "special" cpp files in components that are not part of a components 
library
CORE=core
CORE_STANDALONE=core_standalone
CORE_SIMICS=core_simics
SPECIAL_COMPONENT_CPPS = test.cpp

# Compiler settings
GCC=$(GCC_PATH)/bin/$(GCC_BINARY)
GCC_LIB_PATH=$(GCC_PATH)/lib
GCC_OPTFLAGS=-O3 -funroll-loops
GCC_LANGFLAGS=-Wall -fmessage-length=160 -x c++
GCC_CFLAGS=-c $(GCC_OPTFLAGS) $(GCC_LANGFLAGS)
GCC_LFLAGS=-Wl,--whole-archive
GCC_SIMICS_LFLAGS=-v -shared -export-dynamic -Wl,--whole-archive
GCC_DEPFLAGS=-M

ICC=icc
ICC_OPTFLAGS=-O3 -tpp7 -xi -axW -
ICC_LANGFLAGS=-w1
ICC_RPTFLAGS=-opt_report_level med -opt_report_file opt_report
ICC_CFLAGS=-ipo_c $(ICC_OPTFLAGS) $(ICC_LANGFLAGS) #$(ICC_RPTFLAGS)
ICC_MODID_CFLAGS=-c $(ICC_OPTFLAGS) $(ICC_LANGFLAGS)
ICC_SIMICS_LFLAGS=-shared -export-dynamic
ICC_LFLAGS=

AR=ar
AR_FLAGS=r
RANLIB=ranlib

# For microcode
MASM_CPP = /lib/cpp
MASM = $(COMPONENTS_DIR)/ProtocolEngine/masm/masm


# Useful functions
COMPONENT_HAS_LIBRARY = $(if $(strip $(filter-out 
$(SPECIAL_COMPONENT_CPPS),$(notdir $(wildcard 
$(COMPONENTS_DIR)/$(1)/*.cpp)))),yes,no)

FILTER_LIBS = $(filter %.a,$1)
FILTER_CPPS = $(filter %.cpp,$1)

Reply via email to