ia64/xen-unstable

view docs/Makefile @ 13631:db3d03dfe92f

add libelf: an ELF binary parser library.

This patch adds a library with a small collection of helper functions
to parse and load elf binaries. The library handles endianess and
elfsize at runtime.

The patch also shuffles around the include files a bit. Now there is
*one* include file holding all the elf structures
(xen/include/public/elfstructs.h) which is included by everyone who
needs them.

It's dead code with this patch only, putting the code into use happens
in followup patches.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
tools/libxc/xc_elf.h | 525 -----------------------------------
xen/arch/x86/boot/mkelf32.c | 2
xen/common/Makefile | 2
xen/common/libelf/Makefile | 4
xen/common/libelf/README | 1
xen/common/libelf/libelf-dominfo.c | 420 ++++++++++++++++++++++++++++
xen/common/libelf/libelf-loader.c | 156 ++++++++++
xen/common/libelf/libelf-private.h | 51 +++
xen/common/libelf/libelf-relocate.c | 345 +++++++++++++++++++++++
xen/common/libelf/libelf-tools.c | 225 +++++++++++++++
xen/include/public/elfstructs.h | 527 ++++++++++++++++++++++++++++++++++++
xen/include/public/libelf.h | 238 ++++++++++++++++
xen/include/xen/elf.h | 490 ---------------------------------
13 files changed, 1972 insertions(+), 1014 deletions(-)
author Emmanuel Ackaouy <ack@xensource.com>
date Thu Jan 25 22:16:52 2007 +0000 (2007-01-25)
parents edf0e488ea2a
children ea3c75204555
line source
1 #!/usr/bin/make -f
3 XEN_ROOT=..
4 include $(XEN_ROOT)/Config.mk
6 VERSION = xen-unstable
8 PS2PDF := ps2pdf
9 DVIPS := dvips
10 LATEX := latex
11 FIG2DEV := fig2dev
12 LATEX2HTML := latex2html
13 DOXYGEN := doxygen
14 POD2MAN := pod2man
16 pkgdocdir := /usr/share/doc/xen
17 mandir := /usr/share/man
19 DOC_MAN5SRC := $(wildcard man/*.pod.5)
20 DOC_MAN1SRC := $(wildcard man/*.pod.1)
21 DOC_MAN1 := $(patsubst man/%.pod.1,man1/%.1,$(DOC_MAN1SRC))
22 DOC_MAN5 := $(patsubst man/%.pod.5,man5/%.5,$(DOC_MAN5SRC))
23 DOC_TEX := src/user.tex src/interface.tex
24 DOC_PS := $(patsubst src/%.tex,ps/%.ps,$(DOC_TEX))
25 DOC_PDF := $(patsubst src/%.tex,pdf/%.pdf,$(DOC_TEX))
26 DOC_HTML := $(patsubst src/%.tex,html/%/index.html,$(DOC_TEX))
28 GFX = $(patsubst %.fig, %.eps, $(wildcard figs/*.fig))
30 .PHONY: all
31 all: build
33 .PHONY: build
34 build: ps pdf html man-pages
35 rm -f *.aux *.dvi *.bbl *.blg *.glo *.idx *.ilg *.log *.ind *.toc
37 .PHONY: dev-docs
38 dev-docs: python-dev-docs
40 .PHONY: ps
41 ps: $(DOC_PS)
43 .PHONY: pdf
44 pdf: $(DOC_PDF)
46 .PHONY: html
47 html:
48 @if which $(LATEX2HTML) 1>/dev/null 2>/dev/null; then \
49 $(MAKE) $(DOC_HTML); fi
51 .PHONY: python-dev-docs
52 python-dev-docs:
53 @mkdir -v -p api/tools/python
54 @if which $(DOXYGEN) 1>/dev/null 2>/dev/null; then \
55 echo "Running doxygen to generate Python tools APIs ... "; \
56 $(DOXYGEN) Doxyfile; \
57 $(MAKE) -C api/tools/python/latex ; else \
58 echo "Doxygen not installed; skipping python-dev-docs."; fi
60 .PHONY: man-pages
61 man-pages:
62 @if which $(POD2MAN) 1>/dev/null 2>/dev/null; then \
63 $(MAKE) $(DOC_MAN1) $(DOC_MAN5); fi
65 man1/%.1: man/%.pod.1 Makefile
66 $(INSTALL_DIR) $(@D)
67 $(POD2MAN) --release=$(VERSION) --name=`echo $@ | sed 's/^man1.//'| \
68 sed 's/.1//'` -s 1 -c "Xen" $< $@
70 man5/%.5: man/%.pod.5 Makefile
71 $(INSTALL_DIR) $(@D)
72 $(POD2MAN) --release=$(VERSION) --name=`echo $@ | sed 's/^man5.//'| \
73 sed 's/.5//'` -s 5 -c "Xen" $< $@
75 .PHONY: clean
76 clean:
77 rm -rf .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~
78 rm -rf *.ilg *.log *.ind *.toc *.bak core
79 rm -rf $(GFX) ps pdf html
80 rm -rf api
81 rm -rf man5
82 rm -rf man1
84 .PHONY: distclean
85 distclean: clean
87 .PHONY: install
88 install: all
89 rm -rf $(DESTDIR)$(pkgdocdir)
90 $(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)
91 cp -dR ps $(DESTDIR)$(pkgdocdir)
92 cp -dR pdf $(DESTDIR)$(pkgdocdir)
93 $(INSTALL_DIR) $(DESTDIR)$(mandir)
94 cp -dR man1 $(DESTDIR)$(mandir)
95 cp -dR man5 $(DESTDIR)$(mandir)
96 [ ! -d html ] || cp -dR html $(DESTDIR)$(pkgdocdir)
98 pdf/%.pdf: ps/%.ps
99 $(INSTALL_DIR) $(@D)
100 $(PS2PDF) $< $@.new
101 mv $@.new $@
103 ps/%.ps: %.dvi
104 $(INSTALL_DIR) $(@D)
105 $(DVIPS) -Ppdf -G0 -o $@.new $<
106 mv $@.new $@
108 %.dvi: src/%.tex $(GFX)
109 $(LATEX) $< >/dev/null
110 if [ -e $*.toc ] ; then $(LATEX) $< >/dev/null ; fi
112 %.eps: %.fig
113 $(FIG2DEV) -L eps $< $@
115 html/%/index.html: src/%.tex
116 $(INSTALL_DIR) $(@D)
117 $(LATEX2HTML) -split 0 -show_section_numbers -toc_depth 3 -nonavigation \
118 -numbered_footnotes -local_icons -noinfo -math -dir $(@D) \
119 $< 1>/dev/null 2>/dev/null