快乐虾

http://blog.csdn.net/lights_joy/

lights@hb165.com

 

 

本文适用于

binutils-2.18

configure –target=bfin-uclinux-gnu

Blackfin系列DSP

Cygwin gcc 3.4.4

 

欢迎转载,但请保留作者信息

 

 

1       binutils/Makefile

这个文件由主控Makefile调用configure脚本生成并执行make操作。要求生成的目标为all

1.1    all

Makefile中的第一个目标就是all

all: config.h

       $(MAKE) $(AM_MAKEFLAGS) all-recursive

再往下还有

all: info

info目标是生成一些文档,在此不做分析,因此它将执行all-recursive这个目标。这个目标的生成都是由RECURSIVE_TARGETS来完成的。

RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive /

       html-recursive info-recursive install-data-recursive /

       install-exec-recursive install-info-recursive /

       install-recursive installcheck-recursive installdirs-recursive /

       pdf-recursive ps-recursive uninstall-info-recursive /

       uninstall-recursive

# This directory's subdirectories are mostly independent; you can cd

# into them and run `make' without going through this Makefile.

# To change the values of `make' variables: instead of editing Makefiles,

# (1) if the variable is set in `config.status', edit `config.status'

#     (which will cause the Makefiles to be regenerated when you run `make');

# (2) otherwise, pass the desired values on the `make' command line.

$(RECURSIVE_TARGETS):

@failcom='exit 1'; /

for f in x $$MAKEFLAGS; do /

  case $$f in /

    *=* | --[!k]*);; /

    *k*) failcom='fail=yes';; /

  esac; /

done; /

dot_seen=no; /

target=`echo $@ | sed s/-recursive//`; /

list='$(SUBDIRS)'; for subdir in $$list; do /

  echo "Making $$target in $$subdir"; /

  if test "$$subdir" = "."; then /

    dot_seen=yes; /

    local_target="$$target-am"; /

  else /

    local_target="$$target"; /

  fi; /

  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) /

  || eval $$failcom; /

done; /

if test "$$dot_seen" = "no"; then /

  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; /

fi; test -z "$$fail"

在这段脚本中将分别进入各子目录并执行make xxx操作,xxx-recusive目标的前面一部分。

docpo子目录略过不做分析。当在binutils目录下执行all-recursive操作时,上述脚本转而执行all-am目标,因此下面转而分析all-am目标。这条规则定义为:

all-am: Makefile $(PROGRAMS) config.h

PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)

bin_PROGRAMS = $(am__EXEEXT_6) $(am__EXEEXT_7) $(am__EXEEXT_8) /

       $(am__EXEEXT_9) $(am__EXEEXT_10) $(am__EXEEXT_11) /

           /

        $(am__EXEEXT_12) $(am__EXEEXT_13) /

         $(am__empty)

noinst_PROGRAMS = $(am__EXEEXT_17)

am__EXEEXT_1 = nlmconv$(EXEEXT)

am__EXEEXT_2 = dlltool$(EXEEXT)

am__EXEEXT_3 = windres$(EXEEXT)

am__EXEEXT_4 = windmc$(EXEEXT)

am__EXEEXT_5 = dllwrap$(EXEEXT)

am__EXEEXT_6 = size$(EXEEXT)

am__EXEEXT_7 = objdump$(EXEEXT)

am__EXEEXT_8 = ar$(EXEEXT)

am__EXEEXT_9 = strings$(EXEEXT)

am__EXEEXT_10 = ranlib$(EXEEXT)

am__EXEEXT_11 = objcopy$(EXEEXT)

am__EXEEXT_12 = addr2line$(EXEEXT)

am__EXEEXT_13 = readelf$(EXEEXT)

am__EXEEXT_14 = nm-new$(EXEEXT)

am__EXEEXT_15 = strip-new$(EXEEXT)

am__EXEEXT_16 = cxxfilt$(EXEEXT)

am__EXEEXT_17 = $(am__EXEEXT_14) $(am__EXEEXT_15) $(am__EXEEXT_16)

 

1.2    size$(EXEEXT)

这条规则定义为:

size$(EXEEXT): $(size_OBJECTS) $(size_DEPENDENCIES)

       @rm -f size$(EXEEXT)

       $(LINK) $(size_LDFLAGS) $(size_OBJECTS) $(size_LDADD) $(LIBS)

在目标生成后将它们链接为size.exe

1.2.1   $(size_OBJECTS)

这个变量定义为:

size_OBJECTS = $(am_size_OBJECTS)

am_size_OBJECTS = size.$(OBJEXT) $(am__objects_1)

am__objects_1 = bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)

因而有以下依赖关系:

1.2.1.1             size.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

size.o: size.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h /

  config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h /

  bucomm.h

没什么,直接编译即可。

1.2.1.2             bucomm.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

bucomm.o: bucomm.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h /

  config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/filenames.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h /

  bucomm.h

没什么,直接编译即可。

 

1.2.1.3             version.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

version.o: version.c sysdep.h $(INCDIR)/ansidecl.h /

  ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h /

  $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h

没什么,直接编译即可。

 

1.2.1.4             filemode.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

filemode.o: filemode.c sysdep.h $(INCDIR)/ansidecl.h /

  ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h /

  $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h

没什么,直接编译即可。

1.2.2   $(size_DEPENDENCIES)

这个变量定义为:

size_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)

LIBINTL_DEP =

LIBIBERTY = ../libiberty/libiberty.a

BFDLIB = ../bfd/libbfd.la

所需要的目标均已生成,略过。

1.3    objdump$(EXEEXT)

这条规则定义为:

objdump$(EXEEXT): $(objdump_OBJECTS) $(objdump_DEPENDENCIES)

       @rm -f objdump$(EXEEXT)

       $(LINK) $(objdump_LDFLAGS) $(objdump_OBJECTS) $(objdump_LDADD) $(LIBS)

在目标生成后将它们链接为objdump.exe

1.3.1   $(objdump_OBJECTS)

这个变量定义为:

objdump_OBJECTS = $(am_objdump_OBJECTS)

am_objdump_OBJECTS = objdump.$(OBJEXT) dwarf.$(OBJEXT) prdbg.$(OBJEXT) /

       $(am__objects_2) $(am__objects_1)

am__objects_2 = rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) /

       ieee.$(OBJEXT) rdcoff.$(OBJEXT)

am__objects_1 = bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)

其中am__objects_1定义的目标已经生成,故有以下依赖关系:

1.3.1.1             objdump.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

objdump.o: objdump.c sysdep.h $(INCDIR)/ansidecl.h /

  ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h /

  $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/progress.h /

  bucomm.h dwarf.h $(INCDIR)/safe-ctype.h $(INCDIR)/dis-asm.h /

  ../bfd/bfd.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/demangle.h $(INCDIR)/libiberty.h debug.h /

  budbg.h $(INCDIR)/aout/aout64.h

没什么,直接编译即可。

 

1.3.1.2             dwarf.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

dwarf.o: dwarf.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h /

  config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h /

  $(INCDIR)/ansidecl.h ../bfd/bfd.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/symcat.h bucomm.h $(INCDIR)/elf/dwarf2.h /

  dwarf.h

没什么,直接编译即可。

 

1.3.1.3             prdbg.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

prdbg.o: prdbg.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h /

  config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/demangle.h $(INCDIR)/libiberty.h debug.h /

  budbg.h

没什么,直接编译即可。

 

1.3.1.4             rddbg.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

rddbg.o: rddbg.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h /

  config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h /

  bucomm.h debug.h budbg.h

没什么,直接编译即可。

 

1.3.1.5             debug.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

debug.o: debug.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h /

  config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h /

  debug.h

没什么,直接编译即可。

 

1.3.1.6             stabs.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

stabs.o: stabs.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h /

  config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/safe-ctype.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h /

  debug.h budbg.h $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h /

  $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def

没什么,直接编译即可。

 

1.3.1.7             ieee.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

ieee.o: ieee.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h /

  config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/symcat.h $(INCDIR)/ieee.h $(INCDIR)/libiberty.h /

  $(INCDIR)/ansidecl.h debug.h budbg.h $(INCDIR)/filenames.h

没什么,直接编译即可。

 

1.3.1.8             rdcoff.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

rdcoff.o: rdcoff.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h /

  config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/libiberty.h /

  $(INCDIR)/ansidecl.h bucomm.h debug.h budbg.h $(BFDDIR)/libcoff.h /

  $(INCDIR)/bfdlink.h

没什么,直接编译即可。

1.3.2   $(objdump_DEPENDENCIES)

这个变量定义为:

objdump_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) $(OPCODES)

LIBINTL_DEP =

LIBIBERTY = ../libiberty/libiberty.a

BFDLIB = ../bfd/libbfd.la

OPCODES = ../opcodes/libopcodes.la

所需要的目标均已生成,略过。

1.4    ar$(EXEEXT)

这条规则定义为:

ar$(EXEEXT): $(ar_OBJECTS) $(ar_DEPENDENCIES)

       @rm -f ar$(EXEEXT)

       $(LINK) $(ar_LDFLAGS) $(ar_OBJECTS) $(ar_LDADD) $(LIBS)

在目标生成后将它们链接为objdump.exe

 

1.4.1   $(ar_OBJECTS)

这个变量定义为:

am_ar_OBJECTS = arparse.$(OBJEXT) arlex.$(OBJEXT) ar.$(OBJEXT) /

       not-ranlib.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) /

       binemul.$(OBJEXT) emul_$(EMULATION).$(OBJEXT) $(am__objects_1)

ar_OBJECTS = $(am_ar_OBJECTS)

am__objects_1 = bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)

其中am__objects_1定义的目标已经生成,故有以下依赖关系:

1.4.1.1             arparse.$(OBJEXT)

这条规则定义为:

arparse.o:

       $(COMPILE) -c $< $(NO_WERROR)

且有以下依赖关系:

arparse.o: arparse.c sysdep.h $(INCDIR)/ansidecl.h /

  ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h /

  $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h arsup.h

没什么,直接编译即可。

 

1.4.1.2             arlex.$(OBJEXT)

这条规则定义为:

arlex.o:

       $(COMPILE) -c $< $(NO_WERROR)

且有以下依赖关系:

arlex.o: arlex.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h /

  $(INCDIR)/ansidecl.h arparse.h

没什么,直接编译即可。

 

1.4.1.3             ar.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

ar.o: ar.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h /

  config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/progress.h $(INCDIR)/aout/ar.h $(BFDDIR)/libbfd.h /

  $(INCDIR)/hashtab.h bucomm.h arsup.h $(INCDIR)/filenames.h /

  binemul.h

没什么,直接编译即可。

 

1.4.1.4             not-ranlib.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

not-ranlib.o: not-ranlib.c

没什么,直接编译即可。

 

1.4.1.5             arsup.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

arsup.o: arsup.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h /

  config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/filenames.h bucomm.h arsup.h

没什么,直接编译即可。

 

1.4.1.6             rename.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

rename.o: rename.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h /

  config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/symcat.h bucomm.h

没什么,直接编译即可。

 

1.4.1.7             binemul.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

binemul.o: binemul.c binemul.h sysdep.h $(INCDIR)/ansidecl.h /

  ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h /

  $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h

没什么,直接编译即可。

 

1.4.1.8             emul_$(EMULATION).$(OBJEXT)

在这里:

EMULATION = vanilla

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

emul_vanilla.o: emul_vanilla.c binemul.h sysdep.h $(INCDIR)/ansidecl.h /

  ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h /

  $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h

没什么,直接编译即可。

 

1.4.2   $(ar_DEPENDENCIES)

这个变量定义为:

ar_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)

LIBINTL_DEP =

LIBIBERTY = ../libiberty/libiberty.a

BFDLIB = ../bfd/libbfd.la

所需要的目标均已生成,略过。

 

1.5    strings$(EXEEXT)

这条规则定义为:

strings$(EXEEXT): $(strings_OBJECTS) $(strings_DEPENDENCIES)

       @rm -f strings$(EXEEXT)

       $(LINK) $(strings_LDFLAGS) $(strings_OBJECTS) $(strings_LDADD) $(LIBS)

在目标生成后将它们链接为strings.exe

1.5.1   $(strings_OBJECTS)

这个变量定义为:

am_strings_OBJECTS = strings.$(OBJEXT) $(am__objects_1)

strings_OBJECTS = $(am_strings_OBJECTS)

am__objects_1 = bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)

其中am__objects_1已经生成,故这个目标只剩下strings.o。它由通用规则生成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

strings.o: strings.c sysdep.h $(INCDIR)/ansidecl.h /

  ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h /

  $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h /

  $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h bucomm.h

没什么,直接编译即可。

 

1.5.2   $(strings_DEPENDENCIES)

这个变量定义为:

strings_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)

LIBINTL_DEP =

LIBIBERTY = ../libiberty/libiberty.a

BFDLIB = ../bfd/libbfd.la

所需要的目标均已生成,略过。

 

 

 

1.6    ranlib$(EXEEXT)

这条规则定义为:

ranlib$(EXEEXT): $(ranlib_OBJECTS) $(ranlib_DEPENDENCIES)

       @rm -f ranlib$(EXEEXT)

       $(LINK) $(ranlib_LDFLAGS) $(ranlib_OBJECTS) $(ranlib_LDADD) $(LIBS)

在目标生成后将它们链接为ranlib.exe

1.6.1   $(ranlib_OBJECTS)

这个变量定义为:

am_ranlib_OBJECTS = ar.$(OBJEXT) is-ranlib.$(OBJEXT) arparse.$(OBJEXT) /

       arlex.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) /

       binemul.$(OBJEXT) emul_$(EMULATION).$(OBJEXT) $(am__objects_1)

ranlib_OBJECTS = $(am_ranlib_OBJECTS)

am__objects_1 = bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)

其中除is-ranlib.o目标外,其余目标已经生成,is-ranlib.o这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

is-ranlib.o: is-ranlib.c

没什么,直接编译即可。

 

1.6.2   $(ranlib_DEPENDENCIES)

这个变量定义为:

ranlib_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)

这些目标均已经生成,略过。

1.7    objcopy$(EXEEXT)

这条规则定义为:

objcopy$(EXEEXT): $(objcopy_OBJECTS) $(objcopy_DEPENDENCIES)

       @rm -f objcopy$(EXEEXT)

       $(LINK) $(objcopy_LDFLAGS) $(objcopy_OBJECTS) $(objcopy_LDADD) $(LIBS)

在目标生成后将它们链接为objcopy.exe

1.7.1   $(objcopy_OBJECTS)

这个变量定义为:

am__objects_2 = rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) /

       ieee.$(OBJEXT) rdcoff.$(OBJEXT)

am__objects_3 = $(am__objects_2) wrstabs.$(OBJEXT)

am_objcopy_OBJECTS = objcopy.$(OBJEXT) not-strip.$(OBJEXT) /

       rename.$(OBJEXT) $(am__objects_3) $(am__objects_1)

objcopy_OBJECTS = $(am_objcopy_OBJECTS)

部分目标已经生成故有以下依赖关系:

1.7.1.1             objcopy.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

objcopy.o: objcopy.c sysdep.h $(INCDIR)/ansidecl.h /

  ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h /

  $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/progress.h /

  $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h bucomm.h /

  budbg.h $(INCDIR)/filenames.h $(INCDIR)/fnmatch.h $(BFDDIR)/elf-bfd.h /

  $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h /

  $(INCDIR)/bfdlink.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h

没什么,直接编译即可。

1.7.1.2             not-strip.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

not-strip.o: not-strip.c

没什么,直接编译即可。

1.7.1.3             wrstabs.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

wrstabs.o: wrstabs.c sysdep.h $(INCDIR)/ansidecl.h /

  ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h /

  $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h /

  $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h bucomm.h /

  debug.h budbg.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h /

  $(INCDIR)/aout/stab.def

没什么,直接编译即可。

 

1.7.2   $(objcopy_DEPENDENCIES)

这个变量定义为:

objcopy_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)

这些目标均已经生成,略过。

 

1.8    addr2line$(EXEEXT)

这条规则定义为:

addr2line$(EXEEXT): $(addr2line_OBJECTS) $(addr2line_DEPENDENCIES)

       @rm -f addr2line$(EXEEXT)

       $(LINK) $(addr2line_LDFLAGS) $(addr2line_OBJECTS) $(addr2line_LDADD) $(LIBS)

在目标生成后将它们链接为addr2line.exe

1.8.1   $(addr2line_OBJECTS)

这个变量定义为:

am_addr2line_OBJECTS = addr2line.$(OBJEXT) $(am__objects_1)

addr2line_OBJECTS = $(am_addr2line_OBJECTS)

am__objects_1 = bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)

部分目标已经生成故有以下依赖关系:

1.8.1.1             addr2line.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

addr2line.o: addr2line.c sysdep.h $(INCDIR)/ansidecl.h /

  ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h /

  $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h /

  $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h /

  bucomm.h

没什么,直接编译即可。

 

1.8.2   $(addr2line_DEPENDENCIES)

这个变量定义为:

addr2line_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)

这些目标均已经生成,略过。

 

1.9    readelf$(EXEEXT)

这条规则定义为:

readelf$(EXEEXT): $(readelf_OBJECTS) $(readelf_DEPENDENCIES)

       @rm -f readelf$(EXEEXT)

       $(LINK) $(readelf_LDFLAGS) $(readelf_OBJECTS) $(readelf_LDADD) $(LIBS)

在目标生成后将它们链接为readelf.exe

1.9.1   $(readelf_OBJECTS)

这个变量定义为:

am_readelf_OBJECTS = readelf.$(OBJEXT) version.$(OBJEXT) /

       unwind-ia64.$(OBJEXT) dwarf.$(OBJEXT)

readelf_OBJECTS = $(am_readelf_OBJECTS)

部分目标已经生成故有以下依赖关系:

1.9.1.1             readelf.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

readelf.o: readelf.c sysdep.h $(INCDIR)/ansidecl.h /

  ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h /

  $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h dwarf.h /

  $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h /

  $(INCDIR)/elf/h8.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/alpha.h /

  $(INCDIR)/elf/arc.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/avr.h /

  $(INCDIR)/elf/bfin.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/crx.h /

  $(INCDIR)/elf/d10v.h $(INCDIR)/elf/d30v.h $(INCDIR)/elf/dlx.h /

  $(INCDIR)/elf/fr30.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/hppa.h /

  $(INCDIR)/elf/i386.h $(INCDIR)/elf/i370.h $(INCDIR)/elf/i860.h /

  $(INCDIR)/elf/i960.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/ip2k.h /

  $(INCDIR)/elf/iq2000.h $(INCDIR)/elf/m 32c .h $(INCDIR)/elf/m32r.h /

  $(INCDIR)/elf/m68k.h $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/mcore.h /

  $(INCDIR)/elf/mep.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/mmix.h /

  $(INCDIR)/elf/mn10200.h $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/mt.h /

  $(INCDIR)/elf/msp430.h $(INCDIR)/elf/or32.h $(INCDIR)/elf/pj.h /

  $(INCDIR)/elf/ppc.h $(INCDIR)/elf/ppc64.h $(INCDIR)/elf/s390.h /

  $(INCDIR)/elf/score.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/sparc.h /

  $(INCDIR)/elf/spu.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/vax.h /

  $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/xstormy16.h $(INCDIR)/elf/xtensa.h /

  $(INCDIR)/aout/ar.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h /

  unwind-ia64.h

没什么,直接编译即可。

1.9.1.2             unwind-ia64.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

unwind-ia64.o: unwind-ia64.c unwind-ia64.h $(INCDIR)/elf/ia64.h /

  $(INCDIR)/elf/reloc-macros.h $(INCDIR)/ansidecl.h ../bfd/bfd.h /

  $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h

没什么,直接编译即可。

 

1.9.2   $(readelf_DEPENDENCIES)

这个变量定义为:

readelf_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY)

这些目标均已经生成,略过。

 

1.10       nm-new$(EXEEXT)

这条规则定义为:

nm-new$(EXEEXT): $(nm_new_OBJECTS) $(nm_new_DEPENDENCIES)

       @rm -f nm-new$(EXEEXT)

       $(LINK) $(nm_new_LDFLAGS) $(nm_new_OBJECTS) $(nm_new_LDADD) $(LIBS)

在目标生成后将它们链接为nm-new.exe

1.10.1 $(nm_new_OBJECTS)

这个变量定义为:

am_nm_new_OBJECTS = nm.$(OBJEXT) $(am__objects_1)

nm_new_OBJECTS = $(am_nm_new_OBJECTS)

部分目标已经生成故有以下依赖关系:

1.10.1.1       nm.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

nm.o: nm.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h /

  config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h /

  $(INCDIR)/symcat.h $(INCDIR)/progress.h $(INCDIR)/aout/stab_gnu.h /

  $(INCDIR)/aout/stab.def $(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h /

  $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h /

  $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h /

  $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/common.h /

  bucomm.h

没什么,直接编译即可。

 

1.10.2 $(nm_new_DEPENDENCIES)

这个变量定义为:

nm_new_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)

这些目标均已经生成,略过。

 

1.11       strip-new$(EXEEXT)

这条规则定义为:

strip-new$(EXEEXT): $(strip_new_OBJECTS) $(strip_new_DEPENDENCIES)

       @rm -f strip-new$(EXEEXT)

       $(LINK) $(strip_new_LDFLAGS) $(strip_new_OBJECTS) $(strip_new_LDADD) $(LIBS)

在目标生成后将它们链接为strip-new.exe

1.11.1 $(strip_new_OBJECTS)

这个变量定义为:

am_strip_new_OBJECTS = objcopy.$(OBJEXT) is-strip.$(OBJEXT) /

       rename.$(OBJEXT) $(am__objects_3) $(am__objects_1)

strip_new_OBJECTS = $(am_strip_new_OBJECTS)

am__objects_2 = rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) /

       ieee.$(OBJEXT) rdcoff.$(OBJEXT)

am__objects_3 = $(am__objects_2) wrstabs.$(OBJEXT)

部分目标已经生成故有以下依赖关系:

1.11.1.1       is-strip.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

is-strip.o: is-strip.c

没什么,直接编译即可。

 

1.11.2 $(strip_new_DEPENDENCIES)

这个变量定义为:

strip_new_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)

这些目标均已经生成,略过。

 

1.12       cxxfilt$(EXEEXT)

这条规则定义为:

cxxfilt$(EXEEXT): $(cxxfilt_OBJECTS) $(cxxfilt_DEPENDENCIES)

       @rm -f cxxfilt$(EXEEXT)

       $(LINK) $(cxxfilt_LDFLAGS) $(cxxfilt_OBJECTS) $(cxxfilt_LDADD) $(LIBS)

在目标生成后将它们链接为cxxfilt.exe

1.12.1 $(cxxfilt_OBJECTS)

这个变量定义为:

am_cxxfilt_OBJECTS = cxxfilt.$(OBJEXT) $(am__objects_1)

cxxfilt_OBJECTS = $(am_cxxfilt_OBJECTS)

部分目标已经生成故有以下依赖关系:

1.12.1.1       cxxfilt.$(OBJEXT)

这个目标由通用规则完成:

.c.o:

       $(COMPILE) -c $<

且有以下依赖关系:

cxxfilt.o: cxxfilt.c sysdep.h $(INCDIR)/ansidecl.h /

  ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h /

  $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h /

  $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h /

  $(INCDIR)/safe-ctype.h bucomm.h

没什么,直接编译即可。

 

1.12.2 $(strip_new_DEPENDENCIES)

这个变量定义为:

strip_new_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)

这些目标均已经生成,略过。

2       所有目标的生成顺序

binutils/Makefile: info-recursive: begin

binutils/Makefile: info-recursive: end

binutils/Makefile: all: begin

binutils/Makefile: all-recursive: begin

binutils/Makefile: size.o: begin

binutils/Makefile: size.o: end

binutils/Makefile: bucomm.o: begin

binutils/Makefile: bucomm.o: end

binutils/Makefile: version.o: begin

binutils/Makefile: version.o: end

binutils/Makefile: filemode.o: begin

binutils/Makefile: filemode.o: end

binutils/Makefile: size.exe: begin

binutils/Makefile: size.exe: end

binutils/Makefile: dwarf.o: begin

binutils/Makefile: dwarf.o: end

binutils/Makefile: prdbg.o: begin

binutils/Makefile: prdbg.o: end

binutils/Makefile: rddbg.o: begin

binutils/Makefile: rddbg.o: end

binutils/Makefile: debug.o: begin

binutils/Makefile: debug.o: end

binutils/Makefile: stabs.o: begin

binutils/Makefile: stabs.o: end

binutils/Makefile: ieee.o: begin

binutils/Makefile: ieee.o: end

binutils/Makefile: rdcoff.o: begin

binutils/Makefile: rdcoff.o: end

binutils/Makefile: objdump.exe: begin

binutils/Makefile: objdump.exe: end

binutils/Makefile: arparse.o: begin

binutils/Makefile: arparse.o: end

binutils/Makefile: arlex.o: begin

binutils/Makefile: arlex.o: end

binutils/Makefile: ar.o: begin

binutils/Makefile: ar.o: end

binutils/Makefile: not-ranlib.o: begin

binutils/Makefile: not-ranlib.o: end

binutils/Makefile: arsup.o: begin

binutils/Makefile: arsup.o: end

binutils/Makefile: rename.o: begin

binutils/Makefile: rename.o: end

binutils/Makefile: binemul.o: begin

binutils/Makefile: binemul.o: end

binutils/Makefile: emul_vanilla.o: begin

binutils/Makefile: emul_vanilla.o: end

binutils/Makefile: ar.exe: begin

binutils/Makefile: ar.exe: end

binutils/Makefile: strings.o: begin

binutils/Makefile: strings.o: end

binutils/Makefile: strings.exe: begin

binutils/Makefile: strings.exe: end

binutils/Makefile: is-ranlib.o: begin

binutils/Makefile: is-ranlib.o: end

binutils/Makefile: ranlib.exe: begin

binutils/Makefile: ranlib.exe: end

binutils/Makefile: objcopy.o: begin

binutils/Makefile: objcopy.o: end

binutils/Makefile: not-strip.o: begin

binutils/Makefile: not-strip.o: end

binutils/Makefile: wrstabs.o: begin

binutils/Makefile: wrstabs.o: end

binutils/Makefile: objcopy.exe: begin

binutils/Makefile: objcopy.exe: end

binutils/Makefile: addr2line.o: begin

binutils/Makefile: addr2line.o: end

binutils/Makefile: addr2line.exe: begin

binutils/Makefile: addr2line.exe: end

binutils/Makefile: readelf.o: begin

binutils/Makefile: readelf.o: end

binutils/Makefile: unwind-ia64.o: begin

binutils/Makefile: unwind-ia64.o: end

binutils/Makefile: readelf.exe: begin

binutils/Makefile: readelf.exe: end

binutils/Makefile: nm.o: begin

binutils/Makefile: nm.o: end

binutils/Makefile: nm-new.exe: begin

binutils/Makefile: nm-new.exe: end

binutils/Makefile: is-strip.o: begin

binutils/Makefile: is-strip.o: end

binutils/Makefile: strip-new.exe: begin

binutils/Makefile: strip-new.exe: end

binutils/Makefile: cxxfilt.o: begin

binutils/Makefile: cxxfilt.o: end

binutils/Makefile: cxxfilt.exe: begin

binutils/Makefile: cxxfilt.exe: end

binutils/Makefile: all-recursive: end

binutils/Makefile: all: end

 

3       参考资料

binutils-2.18/libiberty/Makefile分析 2008-8-27

binutils-2.18/bfd/Makefile分析( 2008-8-28 )

binutils-2.18/opcodes/Makefile分析( 2008-8-29 )

binutilssize.exe的生成( 2008-8-29 )

binutilsobjdump.exe的生成( 2008-8-29 )

binutilsar.exe的生成( 2008-8-29 )

 

 

 

 

 

 

Logo

更多推荐