summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-12-19 19:24:24 +0000
committerRichard Purdie <richard@openedhand.com>2006-12-19 19:24:24 +0000
commita8b7d094ed0686b0f6737861e0d82224acedfacc (patch)
tree2f42907c9349b3a79719f15a0d56aa4cdfa1b47a
parent01303ccecf5e0cc24fdd1a67071d1cfd9ead545e (diff)
downloadpoky-a8b7d094ed0686b0f6737861e0d82224acedfacc.tar.gz
Add elfutils, prelink
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1049 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/packages/elfutils/elfutils-0.108/warnings.patch132
-rw-r--r--meta/packages/elfutils/elfutils-0.89/warnings.patch98
-rw-r--r--meta/packages/elfutils/elfutils_0.108.bb36
-rw-r--r--meta/packages/elfutils/elfutils_0.89.bb43
-rw-r--r--meta/packages/prelink/prelink-20061027/arm_eabi.patch286
-rw-r--r--meta/packages/prelink/prelink-20061027/prelink.conf18
-rw-r--r--meta/packages/prelink/prelink-20061027/prelink.cron.daily40
-rw-r--r--meta/packages/prelink/prelink-20061027/prelink.default22
-rw-r--r--meta/packages/prelink/prelink_20061027.bb46
9 files changed, 721 insertions, 0 deletions
diff --git a/meta/packages/elfutils/elfutils-0.108/warnings.patch b/meta/packages/elfutils/elfutils-0.108/warnings.patch
new file mode 100644
index 0000000000..9de027ee26
--- /dev/null
+++ b/meta/packages/elfutils/elfutils-0.108/warnings.patch
@@ -0,0 +1,132 @@
1Index: elfutils-0.108/configure.ac
2===================================================================
3--- elfutils-0.108.orig/configure.ac 2006-04-10 19:18:34.000000000 +0100
4+++ elfutils-0.108/configure.ac 2006-04-10 19:19:33.000000000 +0100
5@@ -49,6 +49,10 @@
6 dnl Add all the languages for which translations are available.
7 ALL_LINGUAS=
8
9+if test X"$CFLAGS" = X; then
10+ CFLAGS="-Wall -Werror -g -O2"
11+fi
12+
13 AC_PROG_CC
14 AC_PROG_RANLIB
15 AC_PROG_YACC
16Index: elfutils-0.108/lib/Makefile.am
17===================================================================
18--- elfutils-0.108.orig/lib/Makefile.am 2006-04-10 19:18:34.000000000 +0100
19+++ elfutils-0.108/lib/Makefile.am 2006-04-10 19:19:33.000000000 +0100
20@@ -21,7 +21,7 @@
21 else
22 AM_CFLAGS =
23 endif
24-AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra $($(*F)_CFLAGS)
25+AM_CFLAGS += -fpic -Wshadow -Wunused $($(*F)_CFLAGS)
26 INCLUDES = -I$(srcdir)/../libelf -I..
27
28 noinst_LIBRARIES = libeu.a
29Index: elfutils-0.108/libasm/Makefile.am
30===================================================================
31--- elfutils-0.108.orig/libasm/Makefile.am 2006-04-10 19:18:34.000000000 +0100
32+++ elfutils-0.108/libasm/Makefile.am 2006-04-10 19:19:33.000000000 +0100
33@@ -18,7 +18,7 @@
34 else
35 AM_CFLAGS =
36 endif
37-AM_CFLAGS += -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2
38+AM_CFLAGS += -Wshadow -Wunused -Wformat=2
39 INCLUDES = -I. -I$(srcdir) -I.. -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \
40 -I$(top_srcdir)/lib
41 GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
42Index: elfutils-0.108/libcpu/Makefile.am
43===================================================================
44--- elfutils-0.108.orig/libcpu/Makefile.am 2006-04-10 19:18:34.000000000 +0100
45+++ elfutils-0.108/libcpu/Makefile.am 2006-04-10 19:19:33.000000000 +0100
46@@ -13,7 +13,7 @@
47 ## 3001 King Ranch Road, Ukiah, CA 95482.
48 ##
49 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
50-AM_CFLAGS = -Wall -Wshadow -Werror -Wextra -Wformat=2 -Wunused
51+AM_CFLAGS = -Wshadow -Wformat=2 -Wunused
52 INCLUDES = -I$(srcdir)
53
54 noinst_LIBRARIES = libcpu_i386.a
55Index: elfutils-0.108/libdw/Makefile.am
56===================================================================
57--- elfutils-0.108.orig/libdw/Makefile.am 2006-04-10 19:18:34.000000000 +0100
58+++ elfutils-0.108/libdw/Makefile.am 2006-04-10 19:19:33.000000000 +0100
59@@ -18,7 +18,7 @@
60 else
61 AM_CFLAGS =
62 endif
63-AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 -Wextra -std=gnu99
64+AM_CFLAGS += -Wshadow -Wunused -Wformat=2 -std=gnu99
65 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib
66 VERSION = 1
67
68Index: elfutils-0.108/libebl/Makefile.am
69===================================================================
70--- elfutils-0.108.orig/libebl/Makefile.am 2006-04-10 19:18:34.000000000 +0100
71+++ elfutils-0.108/libebl/Makefile.am 2006-04-10 19:19:33.000000000 +0100
72@@ -18,7 +18,7 @@
73 else
74 AM_CFLAGS =
75 endif
76-AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 \
77+AM_CFLAGS += -fpic -Wshadow -Wunused -Wformat=2 \
78 -std=gnu99
79
80 INCLUDES = -I$(srcdir) -I$(top_srcdir)/libelf -I$(top_srcdir)/lib -I..
81Index: elfutils-0.108/libelf/Makefile.am
82===================================================================
83--- elfutils-0.108.orig/libelf/Makefile.am 2006-04-10 19:18:34.000000000 +0100
84+++ elfutils-0.108/libelf/Makefile.am 2006-04-10 19:19:33.000000000 +0100
85@@ -21,7 +21,7 @@
86 else
87 AM_CFLAGS =
88 endif
89-AM_CFLAGS += -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 -std=gnu99 \
90+AM_CFLAGS += -Wshadow -Wunused -Wformat=2 -std=gnu99 \
91 $($(*F)_CFLAGS)
92 INCLUDES = -I$(srcdir) -I$(top_srcdir)/lib -I..
93 GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
94Index: elfutils-0.108/src/Makefile.am
95===================================================================
96--- elfutils-0.108.orig/src/Makefile.am 2006-04-10 19:18:34.000000000 +0100
97+++ elfutils-0.108/src/Makefile.am 2006-04-10 19:20:19.000000000 +0100
98@@ -15,14 +15,12 @@
99 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H $(YYDEBUG) \
100 -DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\"
101 if MUDFLAP
102-AM_CFLAGS = -Wall -Wshadow -Wunused -Wextra -std=gnu99 -fmudflap \
103+AM_CFLAGS = -Wshadow -Wunused -std=gnu99 -fmudflap \
104 $(native_ld_cflags) $(if $($(*F)_no_Wunused),,-Wunused) \
105 $(if $($(*F)_no_Wformat),,-Wformat=2)
106 else
107-AM_CFLAGS = -Wall -Wshadow -std=gnu99 $(native_ld_cflags) \
108- $(if $($(*F)_no_Werror),,-Werror) \
109- $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
110- $(if $($(*F)_no_Wformat),,-Wformat=2)
111+AM_CFLAGS = -Wshadow -std=gnu99 $(native_ld_cflags) \
112+ $(if $($(*F)_no_Werror),,-Werror)
113 endif
114 if MUDFLAP
115 libmudflap = -lmudflap
116Index: elfutils-0.108/tests/Makefile.am
117===================================================================
118--- elfutils-0.108.orig/tests/Makefile.am 2006-04-10 19:18:34.000000000 +0100
119+++ elfutils-0.108/tests/Makefile.am 2006-04-10 19:19:33.000000000 +0100
120@@ -14,10 +14,10 @@
121 ##
122 DEFS = -DHAVE_CONFIG_H -D_GNU_SOURCE
123 if MUDFLAP
124-AM_CFLAGS = -Wall -Werror -std=gnu99 -fmudflap\
125+AM_CFLAGS = -std=gnu99 -fmudflap\
126 $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
127 else
128-AM_CFLAGS = -Wall -Werror -std=gnu99 \
129+AM_CFLAGS = -std=gnu99 \
130 $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
131 AM_LDFLAGS = -Wl,-rpath,\$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../libebl:\$$ORIGIN/../libelf
132 endif
diff --git a/meta/packages/elfutils/elfutils-0.89/warnings.patch b/meta/packages/elfutils/elfutils-0.89/warnings.patch
new file mode 100644
index 0000000000..2a1ea09a61
--- /dev/null
+++ b/meta/packages/elfutils/elfutils-0.89/warnings.patch
@@ -0,0 +1,98 @@
1--- elfutils-0.89/configure.ac~warnings.patch 2003-09-26 02:04:04.000000000 -0400
2+++ elfutils-0.89/configure.ac 2004-05-01 00:16:33.000000000 -0400
3@@ -28,6 +28,10 @@
4
5 ALL_LINGUAS=
6
7+if test X"$CFLAGS" = X; then
8+ CFLAGS="-Wall -Werror -g -O2"
9+fi
10+
11 AC_PROG_CC
12 AC_PROG_CPP
13 AC_PROG_GCC_TRADITIONAL
14--- elfutils-0.89/./lib/Makefile.am~warnings.patch 2003-09-22 18:57:58.000000000 -0400
15+++ elfutils-0.89/./lib/Makefile.am 2004-05-01 00:12:43.000000000 -0400
16@@ -14,7 +14,7 @@
17 ## 3001 King Ranch Road, Ukiah, CA 95482.
18 ##
19 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
20-AM_CFLAGS = -Wall -Werror -fpic
21+AM_CFLAGS = -fpic
22 INCLUDES = -I$(srcdir)/../libelf -I..
23
24 noinst_LIBRARIES = libeu.a
25--- elfutils-0.89/./libelf/Makefile.am~warnings.patch 2003-08-12 02:45:24.000000000 -0400
26+++ elfutils-0.89/./libelf/Makefile.am 2004-05-01 00:12:43.000000000 -0400
27@@ -14,7 +14,6 @@
28 ## 3001 King Ranch Road, Ukiah, CA 95482.
29 ##
30 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
31-AM_CFLAGS = -Wall -Werror
32 INCLUDES = -I$(srcdir) -I$(top_srcdir)/lib -I..
33 GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
34 VERSION = 1
35--- elfutils-0.89/./libebl/Makefile.am~warnings.patch 2003-09-22 18:53:17.000000000 -0400
36+++ elfutils-0.89/./libebl/Makefile.am 2004-05-01 00:12:43.000000000 -0400
37@@ -14,7 +14,7 @@
38 ## 3001 King Ranch Road, Ukiah, CA 95482.
39 ##
40 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -Wall
41-AM_CFLAGS = -Wall -Werror -DOBJDIR=\"$(shell pwd)\" -fpic
42+AM_CFLAGS = -DOBJDIR=\"$(shell pwd)\" -fpic
43 INCLUDES = -I$(srcdir) -I$(top_srcdir)/libelf -I$(top_srcdir)/lib -I..
44 VERSION = 1
45 PACKAGE_VERSION = @PACKAGE_VERSION@
46--- elfutils-0.89/./libdwarf/Makefile.am~warnings.patch 2003-08-12 02:46:05.000000000 -0400
47+++ elfutils-0.89/./libdwarf/Makefile.am 2004-05-01 00:12:43.000000000 -0400
48@@ -14,7 +14,6 @@
49 ## 3001 King Ranch Road, Ukiah, CA 95482.
50 ##
51 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DDWARF_DEBUG
52-AM_CFLAGS = -Wall -Werror
53 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib
54 VERSION = 1
55
56--- elfutils-0.89/./libdw/Makefile.am~warnings.patch 2003-08-12 02:46:18.000000000 -0400
57+++ elfutils-0.89/./libdw/Makefile.am 2004-05-01 00:12:43.000000000 -0400
58@@ -17,7 +17,6 @@
59 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
60 ##
61 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
62-AM_CFLAGS = -Wall -Werror -Wshadow
63 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib
64 VERSION = 1
65
66--- elfutils-0.89/./libasm/Makefile.am~warnings.patch 2003-08-13 05:21:25.000000000 -0400
67+++ elfutils-0.89/./libasm/Makefile.am 2004-05-01 00:12:43.000000000 -0400
68@@ -14,7 +14,6 @@
69 ## 3001 King Ranch Road, Ukiah, CA 95482.
70 ##
71 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H
72-AM_CFLAGS = -Wall -Werror
73 INCLUDES = -I. -I$(srcdir) -I.. -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl \
74 -I$(top_srcdir)/lib
75 GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include)
76--- elfutils-0.89/./src/Makefile.am~warnings.patch 2003-09-22 18:57:09.000000000 -0400
77+++ elfutils-0.89/./src/Makefile.am 2004-05-01 00:12:43.000000000 -0400
78@@ -14,8 +14,8 @@
79 ## 3001 King Ranch Road, Ukiah, CA 95482.
80 ##
81 DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -Wall -Wshadow $(YYDEBUG) \
82- $(if $($(*F)_no_Werror),,-Werror) $(native_ld_cflags)
83-AM_CFLAGS = -Wall -DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\"
84+ $(if $(filter -Werror,$(CFLAGS)),$(if $($(*F)_no_Werror),,-Werror)) $(native_ld_cflags)
85+AM_CFLAGS = -DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\"
86 INCLUDES = -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl -I$(srcdir)/../lib -I$(srcdir)/../libdwarf -I..
87
88 YACC = @YACC@ -d
89--- elfutils-0.89/./tests/Makefile.am~warnings.patch 2003-08-13 05:19:04.000000000 -0400
90+++ elfutils-0.89/./tests/Makefile.am 2004-05-01 00:12:43.000000000 -0400
91@@ -14,7 +14,6 @@
92 ## 3001 King Ranch Road, Ukiah, CA 95482.
93 ##
94 DEFS = -DHAVE_CONFIG_H -D_GNU_SOURCE
95-AM_CFLAGS = -Wall -Werror
96 AM_LDFLAGS = -Wl,-rpath,\$$ORIGIN/../libasm:\$$ORIGIN/../libdwarf:\$$ORIGIN/../libdw:\$$ORIGIN/../libebl:\$$ORIGIN/../libelf
97 INCLUDES = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdwarf \
98 -I$(top_srcdir)/libdw \
diff --git a/meta/packages/elfutils/elfutils_0.108.bb b/meta/packages/elfutils/elfutils_0.108.bb
new file mode 100644
index 0000000000..83acc7dccb
--- /dev/null
+++ b/meta/packages/elfutils/elfutils_0.108.bb
@@ -0,0 +1,36 @@
1SECTION = "base"
2LICENSE = "OSL"
3DESCRIPTION = "A collection of utilities and DSOs to handle compiled objects."
4DEPENDS = "libtool"
5
6SRC_URI = "http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/elfutils-${PV}.tar.gz \
7 file://warnings.patch;patch=1"
8
9inherit autotools
10
11SOV = "${PV}"
12do_stage () {
13 install -m 0644 libelf/libelf.a ${STAGING_LIBDIR}/libelf.a
14 install -m 0755 libelf/libelf.so.1 ${STAGING_LIBDIR}/libelf-${SOV}.so
15 ln -sf libelf-${SOV}.so ${STAGING_LIBDIR}/libelf.so.1
16 ln -sf libelf.so.1 ${STAGING_LIBDIR}/libelf.so
17 install -m 0644 libasm/libasm.a ${STAGING_LIBDIR}/libasm.a
18 install -m 0755 libasm/libasm.so.1 ${STAGING_LIBDIR}/libasm-${SOV}.so
19 ln -sf libasm-${SOV}.so ${STAGING_LIBDIR}/libasm.so.1
20 ln -sf libasm.so.1 ${STAGING_LIBDIR}/libasm.so
21 install -m 0644 libdw/libdw.a ${STAGING_LIBDIR}/libdw.a
22 install -m 0755 libdw/libdw.so.1 ${STAGING_LIBDIR}/libdw-${SOV}.so
23 ln -sf libdw-${SOV}.so ${STAGING_LIBDIR}/libdw.so.1
24 ln -sf libdw.so.1 ${STAGING_LIBDIR}/libdw.so
25 install -m 0644 libebl/libebl.a ${STAGING_LIBDIR}/libebl.a
26 install -d ${STAGING_LIBDIR}/elfutils/
27 install -m 0755 libebl/libebl_*.so ${STAGING_LIBDIR}/elfutils/
28
29 install -m 0644 ${S}/libelf/libelf.h ${STAGING_INCDIR}/
30 install -m 0644 ${S}/libelf/gelf.h ${STAGING_INCDIR}/
31 install -m 0644 ${S}/libelf/nlist.h ${STAGING_INCDIR}/
32 install -d ${STAGING_INCDIR}/elfutils
33 install -m 0644 ${S}/libebl/libebl.h ${STAGING_INCDIR}/elfutils/
34 install -m 0644 ${S}/libdw/libdw.h ${STAGING_INCDIR}/elfutils/
35 install -m 0644 ${S}/libasm/libasm.h ${STAGING_INCDIR}/elfutils/
36}
diff --git a/meta/packages/elfutils/elfutils_0.89.bb b/meta/packages/elfutils/elfutils_0.89.bb
new file mode 100644
index 0000000000..aad2275ef9
--- /dev/null
+++ b/meta/packages/elfutils/elfutils_0.89.bb
@@ -0,0 +1,43 @@
1SECTION = "base"
2LICENSE = "OSL"
3DESCRIPTION = "A collection of utilities and DSOs to handle compiled objects."
4DEPENDS = "libtool"
5
6SRC_URI = "http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/elfutils-${PV}.tar.gz \
7 file://warnings.patch;patch=1"
8
9inherit autotools
10
11SOV = "${PV}"
12do_stage () {
13 install -m 0644 libelf/libelf.a ${STAGING_LIBDIR}/libelf.a
14 install -m 0755 libelf/libelf.so.1 ${STAGING_LIBDIR}/libelf-${SOV}.so
15 ln -sf libelf-${SOV}.so ${STAGING_LIBDIR}/libelf.so.1
16 ln -sf libelf.so.1 ${STAGING_LIBDIR}/libelf.so
17 install -m 0644 libasm/libasm.a ${STAGING_LIBDIR}/libasm.a
18 install -m 0755 libasm/libasm.so.1 ${STAGING_LIBDIR}/libasm-${SOV}.so
19 ln -sf libasm-${SOV}.so ${STAGING_LIBDIR}/libasm.so.1
20 ln -sf libasm.so.1 ${STAGING_LIBDIR}/libasm.so
21 install -m 0644 libdw/libdw.a ${STAGING_LIBDIR}/libdw.a
22 install -m 0755 libdw/libdw.so.1 ${STAGING_LIBDIR}/libdw-${SOV}.so
23 ln -sf libdw-${SOV}.so ${STAGING_LIBDIR}/libdw.so.1
24 ln -sf libdw.so.1 ${STAGING_LIBDIR}/libdw.so
25 install -m 0644 libebl/libebl.a ${STAGING_LIBDIR}/libebl.a
26 install -d ${STAGING_LIBDIR}/elfutils/
27 install -m 0755 libebl/libebl_*.so ${STAGING_LIBDIR}/elfutils/
28 install -m 0644 libdwarf/libdwarf.a ${STAGING_LIBDIR}/libdwarf.a
29 install -m 0755 libdwarf/libdwarf.so.1 ${STAGING_LIBDIR}/libdwarf-${SOV}.so
30 ln -sf libdwarf-${SOV}.so ${STAGING_LIBDIR}/libdwarf.so.1
31 ln -sf libdwarf.so.1 ${STAGING_LIBDIR}/libdwarf.so
32
33 install -m 0644 ${S}/libelf/libelf.h ${STAGING_INCDIR}/
34 install -m 0644 ${S}/libelf/gelf.h ${STAGING_INCDIR}/
35 install -m 0644 ${S}/libelf/nlist.h ${STAGING_INCDIR}/
36 install -m 0644 ${S}/libdwarf/dwarf.h ${STAGING_INCDIR}/
37 install -d ${STAGING_INCDIR}/elfutils
38 install -m 0644 ${S}/libebl/libebl.h ${STAGING_INCDIR}/elfutils/
39 install -m 0644 ${S}/libebl/elf-knowledge.h ${STAGING_INCDIR}/elfutils/
40 install -m 0644 ${S}/libdwarf/libdwarf.h ${STAGING_INCDIR}/elfutils/
41 install -m 0644 ${S}/libdw/libdw.h ${STAGING_INCDIR}/elfutils/
42 install -m 0644 ${S}/libasm/libasm.h ${STAGING_INCDIR}/elfutils/
43}
diff --git a/meta/packages/prelink/prelink-20061027/arm_eabi.patch b/meta/packages/prelink/prelink-20061027/arm_eabi.patch
new file mode 100644
index 0000000000..b234af9b3f
--- /dev/null
+++ b/meta/packages/prelink/prelink-20061027/arm_eabi.patch
@@ -0,0 +1,286 @@
1Index: prelink-0.0.20050901/src/arch-arm.c
2===================================================================
3--- prelink-0.0.20050901.orig/src/arch-arm.c 2004-09-30 17:07:57.000000000 +0100
4+++ prelink-0.0.20050901/src/arch-arm.c 2006-04-07 14:41:25.000000000 +0100
5@@ -145,6 +145,24 @@
6 error (0, 0, "%s: R_ARM_PC24 relocs with non-zero addend should not be present in prelinked REL sections",
7 dso->filename);
8 return 1;
9+ case R_ARM_TLS_DTPOFF32:
10+ write_le32 (dso, rel->r_offset, value);
11+ break;
12+ /* DTPMOD32 and TPOFF32 is impossible to predict unless prelink
13+ sets the rules. Also for TPOFF{32,} there is REL->RELA problem. */
14+ case R_ARM_TLS_DTPMOD32:
15+ if (dso->ehdr.e_type == ET_EXEC)
16+ {
17+ error (0, 0, "%s: R_ARM_TLS_DTPMOD32 reloc in executable?",
18+ dso->filename);
19+ return 1;
20+ }
21+ break;
22+ case R_ARM_TLS_TPOFF32:
23+ if (dso->ehdr.e_type == ET_EXEC)
24+ error (0, 0, "%s: R_ARM_TLS_TPOFF32 relocs should not be present in prelinked ET_EXEC REL sections",
25+ dso->filename);
26+ break;
27 case R_ARM_COPY:
28 if (dso->ehdr.e_type == ET_EXEC)
29 /* COPY relocs are handled specially in generic code. */
30@@ -195,6 +213,24 @@
31 write_le32 (dso, rela->r_offset,
32 (read_ule32 (dso, rela->r_offset) & 0xff000000) | val);
33 break;
34+ case R_ARM_TLS_DTPOFF32:
35+ write_le32 (dso, rela->r_offset, value + rela->r_addend);
36+ break;
37+ /* DTPMOD32 and TPOFF32 is impossible to predict unless prelink
38+ sets the rules. */
39+ case R_ARM_TLS_DTPMOD32:
40+ if (dso->ehdr.e_type == ET_EXEC)
41+ {
42+ error (0, 0, "%s: R_ARM_TLS_DTPMOD32 reloc in executable?",
43+ dso->filename);
44+ return 1;
45+ }
46+ break;
47+ case R_ARM_TLS_TPOFF32:
48+ if (dso->ehdr.e_type == ET_EXEC && info->resolvetls)
49+ write_le32 (dso, rela->r_offset,
50+ -(value + rela->r_addend - info->resolvetls->offset));
51+ break;
52 case R_ARM_COPY:
53 if (dso->ehdr.e_type == ET_EXEC)
54 /* COPY relocs are handled specially in generic code. */
55@@ -315,6 +351,7 @@
56 {
57 GElf_Addr value;
58 struct prelink_conflict *conflict;
59+ struct prelink_tls *tls;
60 GElf_Rela *ret;
61
62 if (GELF_R_TYPE (rel->r_info) == R_ARM_RELATIVE
63@@ -324,8 +361,31 @@
64 conflict = prelink_conflict (info, GELF_R_SYM (rel->r_info),
65 GELF_R_TYPE (rel->r_info));
66 if (conflict == NULL)
67- return 0;
68- value = conflict_lookup_value (conflict);
69+ {
70+ if (info->curtls == NULL)
71+ return 0;
72+ switch (GELF_R_TYPE (rel->r_info))
73+ {
74+ /* Even local DTPMOD and TPOFF relocs need conflicts. */
75+ case R_ARM_TLS_DTPMOD32:
76+ case R_ARM_TLS_TPOFF32:
77+ break;
78+ default:
79+ return 0;
80+ }
81+ value = 0;
82+ }
83+ else
84+ {
85+ /* DTPOFF32 wants to see only real conflicts, not lookups
86+ with reloc_class RTYPE_CLASS_TLS. */
87+ if (GELF_R_TYPE (rel->r_info) == R_ARM_TLS_DTPOFF32
88+ && conflict->lookup.tls == conflict->conflict.tls
89+ && conflict->lookupval == conflict->conflictval)
90+ return 0;
91+
92+ value = conflict_lookup_value (conflict);
93+ }
94 ret = prelink_conflict_add_rela (info);
95 if (ret == NULL)
96 return 1;
97@@ -342,6 +402,33 @@
98 error (0, 0, "%s: R_ARM_%s relocs should not be present in prelinked REL sections",
99 dso->filename, GELF_R_TYPE (rel->r_info) == R_ARM_ABS32 ? "ABS32" : "PC24");
100 return 1;
101+ case R_ARM_TLS_DTPMOD32:
102+ case R_ARM_TLS_DTPOFF32:
103+ case R_ARM_TLS_TPOFF32:
104+ if (conflict != NULL
105+ && (conflict->reloc_class != RTYPE_CLASS_TLS
106+ || conflict->lookup.tls == NULL))
107+ {
108+ error (0, 0, "%s: R_ARM_TLS not resolving to STT_TLS symbol",
109+ dso->filename);
110+ return 1;
111+ }
112+ tls = conflict ? conflict->lookup.tls : info->curtls;
113+ ret->r_info = GELF_R_INFO (0, R_ARM_ABS32);
114+ switch (GELF_R_TYPE (rel->r_info))
115+ {
116+ case R_ARM_TLS_DTPMOD32:
117+ ret->r_addend = tls->modid;
118+ break;
119+ case R_ARM_TLS_DTPOFF32:
120+ ret->r_addend = value;
121+ break;
122+ case R_ARM_TLS_TPOFF32:
123+ ret->r_addend = -(value + read_ule32 (dso, rel->r_offset)
124+ - tls->offset);
125+ break;
126+ }
127+ break;
128 case R_ARM_COPY:
129 error (0, 0, "R_ARM_COPY should not be present in shared libraries");
130 return 1;
131@@ -359,6 +446,7 @@
132 {
133 GElf_Addr value;
134 struct prelink_conflict *conflict;
135+ struct prelink_tls *tls;
136 GElf_Rela *ret;
137 Elf32_Sword val;
138
139@@ -369,8 +457,31 @@
140 conflict = prelink_conflict (info, GELF_R_SYM (rela->r_info),
141 GELF_R_TYPE (rela->r_info));
142 if (conflict == NULL)
143- return 0;
144- value = conflict_lookup_value (conflict);
145+ {
146+ if (info->curtls == NULL)
147+ return 0;
148+ switch (GELF_R_TYPE (rela->r_info))
149+ {
150+ /* Even local DTPMOD and TPOFF relocs need conflicts. */
151+ case R_ARM_TLS_DTPMOD32:
152+ case R_ARM_TLS_TPOFF32:
153+ break;
154+ default:
155+ return 0;
156+ }
157+ value = 0;
158+ }
159+ else
160+ {
161+ /* DTPOFF32 wants to see only real conflicts, not lookups
162+ with reloc_class RTYPE_CLASS_TLS. */
163+ if (GELF_R_TYPE (rela->r_info) == R_ARM_TLS_DTPOFF32
164+ && conflict->lookup.tls == conflict->conflict.tls
165+ && conflict->lookupval == conflict->conflictval)
166+ return 0;
167+
168+ value = conflict_lookup_value (conflict);
169+ }
170 ret = prelink_conflict_add_rela (info);
171 if (ret == NULL)
172 return 1;
173@@ -398,6 +509,32 @@
174 case R_ARM_COPY:
175 error (0, 0, "R_ARM_COPY should not be present in shared libraries");
176 return 1;
177+ case R_ARM_TLS_DTPMOD32:
178+ case R_ARM_TLS_DTPOFF32:
179+ case R_ARM_TLS_TPOFF32:
180+ if (conflict != NULL
181+ && (conflict->reloc_class != RTYPE_CLASS_TLS
182+ || conflict->lookup.tls == NULL))
183+ {
184+ error (0, 0, "%s: R_386_TLS not resolving to STT_TLS symbol",
185+ dso->filename);
186+ return 1;
187+ }
188+ tls = conflict ? conflict->lookup.tls : info->curtls;
189+ ret->r_info = GELF_R_INFO (0, R_ARM_ABS32);
190+ switch (GELF_R_TYPE (rela->r_info))
191+ {
192+ case R_ARM_TLS_DTPMOD32:
193+ ret->r_addend = tls->modid;
194+ break;
195+ case R_ARM_TLS_DTPOFF32:
196+ ret->r_addend += value;
197+ break;
198+ case R_ARM_TLS_TPOFF32:
199+ ret->r_addend = -(value + rela->r_addend - tls->offset);
200+ break;
201+ }
202+ break;
203 default:
204 error (0, 0, "%s: Unknown arm relocation type %d", dso->filename,
205 (int) GELF_R_TYPE (rela->r_info));
206@@ -418,6 +555,7 @@
207 abort ();
208 case R_ARM_RELATIVE:
209 case R_ARM_ABS32:
210+ case R_ARM_TLS_TPOFF32:
211 rela->r_addend = (Elf32_Sword) read_ule32 (dso, rel->r_offset);
212 break;
213 case R_ARM_PC24:
214@@ -426,6 +564,8 @@
215 break;
216 case R_ARM_COPY:
217 case R_ARM_GLOB_DAT:
218+ case R_ARM_TLS_DTPOFF32:
219+ case R_ARM_TLS_DTPMOD32:
220 rela->r_addend = 0;
221 break;
222 }
223@@ -445,6 +585,7 @@
224 abort ();
225 case R_ARM_RELATIVE:
226 case R_ARM_ABS32:
227+ case R_ARM_TLS_TPOFF32:
228 write_le32 (dso, rela->r_offset, rela->r_addend);
229 break;
230 case R_ARM_PC24:
231@@ -453,6 +594,8 @@
232 | ((rela->r_addend >> 2) & 0xffffff));
233 break;
234 case R_ARM_GLOB_DAT:
235+ case R_ARM_TLS_DTPMOD32:
236+ case R_ARM_TLS_DTPOFF32:
237 write_le32 (dso, rela->r_offset, 0);
238 break;
239 }
240@@ -488,6 +631,13 @@
241 /* FALLTHROUGH */
242 case R_ARM_PC24:
243 return 1;
244+ case R_ARM_TLS_TPOFF32:
245+ /* In shared libraries TPOFF is changed always into
246+ conflicts, for executables we need to preserve
247+ original addend. */
248+ if (dso->ehdr.e_type == ET_EXEC)
249+ return 1;
250+ break;
251 }
252 }
253 }
254@@ -612,6 +762,12 @@
255 return 0;
256 error (0, 0, "%s: R_ARM_COPY reloc in shared library?", dso->filename);
257 return 1;
258+ case R_ARM_TLS_DTPMOD32:
259+ case R_ARM_TLS_DTPOFF32:
260+ write_le32 (dso, rel->r_offset, 0);
261+ break;
262+ case R_ARM_TLS_TPOFF32:
263+ break;
264 default:
265 error (0, 0, "%s: Unknown arm relocation type %d", dso->filename,
266 (int) GELF_R_TYPE (rel->r_info));
267@@ -634,6 +790,10 @@
268 {
269 case R_ARM_COPY: return RTYPE_CLASS_COPY;
270 case R_ARM_JUMP_SLOT: return RTYPE_CLASS_PLT;
271+ case R_ARM_TLS_DTPMOD32:
272+ case R_ARM_TLS_DTPOFF32:
273+ case R_ARM_TLS_TPOFF32:
274+ return RTYPE_CLASS_TLS;
275 default: return RTYPE_CLASS_VALID;
276 }
277 }
278@@ -646,7 +806,7 @@
279 .R_JMP_SLOT = R_ARM_JUMP_SLOT,
280 .R_COPY = R_ARM_COPY,
281 .R_RELATIVE = R_ARM_RELATIVE,
282- .dynamic_linker = "/lib/ld-linux.so.2",
283+ .dynamic_linker = "/lib/ld-linux.so.3",
284 .adjust_dyn = arm_adjust_dyn,
285 .adjust_rel = arm_adjust_rel,
286 .adjust_rela = arm_adjust_rela,
diff --git a/meta/packages/prelink/prelink-20061027/prelink.conf b/meta/packages/prelink/prelink-20061027/prelink.conf
new file mode 100644
index 0000000000..c5a4f4adc3
--- /dev/null
+++ b/meta/packages/prelink/prelink-20061027/prelink.conf
@@ -0,0 +1,18 @@
1# This config file contains a list of directories both with binaries
2# and libraries prelink should consider by default.
3# If a directory name is prefixed with `-l ', the directory hierarchy
4# will be walked as long as filesystem boundaries are not crossed.
5# If a directory name is prefixed with `-h ', symbolic links in a
6# directory hierarchy are followed.
7-l /usr/local/sbin
8-l /sbin
9-l /usr/sbin
10-l /usr/local/bin
11-l /bin
12-l /usr/bin
13-l /usr/X11R6/bin
14-l /usr/games
15-l /usr/local/lib
16-l /lib
17-l /usr/lib
18-l /usr/X11R6/lib
diff --git a/meta/packages/prelink/prelink-20061027/prelink.cron.daily b/meta/packages/prelink/prelink-20061027/prelink.cron.daily
new file mode 100644
index 0000000000..0b3c07322c
--- /dev/null
+++ b/meta/packages/prelink/prelink-20061027/prelink.cron.daily
@@ -0,0 +1,40 @@
1#!/bin/sh
2
3. /etc/default/prelink
4
5renice +19 -p $$ >/dev/null 2>&1
6
7if [ "$PRELINKING" != yes ]; then
8 if [ -f /etc/prelink.cache ]; then
9 echo /usr/sbin/prelink -uav > /var/log/prelink.log
10 /usr/sbin/prelink -uav >> /var/log/prelink.log 2>&1
11 rm -f /etc/prelink.cache
12 # Restart init if needed
13 [ -n "$(find `ldd /sbin/init | awk '{ print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u
14 fi
15 exit 0
16fi
17
18if [ ! -f /etc/prelink.cache -o -f /var/lib/misc/prelink.force ] \
19 || grep -q '^prelink-ELF0.[0-2]' /etc/prelink.cache; then
20 # If cache does not exist or is from older prelink versions or
21 # if we were asked to explicitely, force full prelinking
22 rm -f /etc/prelink.cache /var/lib/misc/prelink.force
23 PRELINK_OPTS="$PRELINK_OPTS -f"
24 date > /var/lib/misc/prelink.full
25elif [ -n "$PRELINK_FULL_TIME_INTERVAL" \
26 -a "`find /var/lib/misc/prelink.full -mtime -${PRELINK_FULL_TIME_INTERVAL} 2>/dev/null`" \
27 = /var/lib/misc/prelink.full ]; then
28 # If prelink without -q has been run in the last
29 # PRELINK_FULL_TIME_INTERVAL days, just use quick mode
30 PRELINK_OPTS="$PRELINK_OPTS -q"
31else
32 date > /var/lib/misc/prelink.full
33fi
34
35echo /usr/sbin/prelink -av $PRELINK_OPTS > /var/log/prelink.log
36/usr/sbin/prelink -av $PRELINK_OPTS >> /var/log/prelink.log 2>&1
37# Restart init if needed
38[ -n "$(find `ldd /sbin/init | awk '{ print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u
39
40exit 0
diff --git a/meta/packages/prelink/prelink-20061027/prelink.default b/meta/packages/prelink/prelink-20061027/prelink.default
new file mode 100644
index 0000000000..901258ed2a
--- /dev/null
+++ b/meta/packages/prelink/prelink-20061027/prelink.default
@@ -0,0 +1,22 @@
1# Set this to no to disable prelinking altogether
2# or to yes to enable it.
3# (if you change this from yes to no prelink -ua
4# will be run next night to undo prelinking)
5PRELINKING=unknown
6
7# Options to pass to prelink
8# -m Try to conserve virtual memory by allowing overlapping
9# assigned virtual memory slots for libraries which
10# never appear together in one binary
11# -R Randomize virtual memory slot assignments for libraries.
12# This makes it slightly harder for various buffer overflow
13# attacks, since library addresses will be different on each
14# host using -R.
15PRELINK_OPTS=-mR
16
17# How often should full prelink be run (in days)
18# Normally, prelink will be run in quick mode, every
19# $PRELINK_FULL_TIME_INTERVAL days it will be run
20# in normal mode. Comment this line out if prelink
21# should be run in normal mode always.
22PRELINK_FULL_TIME_INTERVAL=14
diff --git a/meta/packages/prelink/prelink_20061027.bb b/meta/packages/prelink/prelink_20061027.bb
new file mode 100644
index 0000000000..a83ff1b61f
--- /dev/null
+++ b/meta/packages/prelink/prelink_20061027.bb
@@ -0,0 +1,46 @@
1SECTION = "devel"
2DEPENDS = "elfutils"
3DESCRIPTION = " The prelink package contains a utility which modifies ELF shared libraries \
4and executables, so that far fewer relocations need to be resolved at \
5runtime and thus programs come up faster."
6LICENSE = "GPL"
7PR = "r2"
8
9SRC_URI = "${DEBIAN_MIRROR}/main/p/prelink/prelink_0.0.${PV}.orig.tar.gz \
10 file://prelink.conf \
11 file://prelink.cron.daily \
12 file://prelink.default"
13
14TARGET_OS_ORIG := "${TARGET_OS}"
15OVERRIDES_append = ":${TARGET_OS_ORIG}"
16SRC_URI_append_linux-gnueabi = " file://arm_eabi.patch;patch=1"
17
18S = "${WORKDIR}/prelink-0.0.${PV}"
19
20EXTRA_OECONF = "--disable-64bit"
21
22inherit autotools
23
24do_install_append () {
25 install -d ${D}${sysconfdir}/cron.daily ${D}${sysconfdir}/default
26 install -m 0644 ${WORKDIR}/prelink.conf ${D}${sysconfdir}/prelink.conf
27 install -m 0644 ${WORKDIR}/prelink.cron.daily ${D}${sysconfdir}/cron.daily/prelink
28 install -m 0644 ${WORKDIR}/prelink.default ${D}${sysconfdir}/default/prelink
29}
30
31pkg_postinst_prelink() {
32#!/bin/sh
33
34if [ "x$D" != "x" ]; then
35 exit 1
36fi
37
38prelink -a
39}
40
41pkg_postrm_prelink() {
42#!/bin/sh
43
44prelink -au
45}
46