Gentoo Archives: gentoo-embedded

From: Ned Ludd <solar@g.o>
To: "Peter S. Mazinger" <ps.m@×××.net>
Cc: gentoo-embedded@l.g.o, gentoo-hardened@l.g.o
Subject: [gentoo-embedded] Re: (was) uclibc base system; arm and pie
Date: Thu, 24 Jun 2004 08:01:00
Message-Id: 1088063779.14066.924.camel@simple
In Reply to: [gentoo-embedded] Re: (was) uclibc base system; arm and pie by "Peter S. Mazinger"
1 On Thu, 2004-06-24 at 03:03, Peter S. Mazinger wrote:
2 > On 23 Jun 2004, Ned Ludd wrote:
3 >
4 > > Side Note Off Topic:
5 > >
6 > > Both arm & mips fail a simple
7 > > echo 'int main() { return 0; }' > main.c
8 > > gcc -o main main.c -pie
9 > >
10 > > /usr/lib/libc_nonshared.a(elf-init.oS)(.text+0x38): In function
11 > > `__libc_csu_init':
12 > > : undefined reference to `__init_array_start'
13 > > /usr/lib/libc_nonshared.a(elf-init.oS)(.text+0x3c): In function
14 > > `__libc_csu_init':
15 > > : undefined reference to `__init_array_end'
16 > >
17 > > I think these symbols are provided by linker scripts.
18 > > Seen anything floating around where others have run into the same thing?
19 > > If so recall the solution?
20 >
21 > Is the used gcc surely patched for pie?
22 > gcc (3.3.3+branch,3.4.0) does not support pie for arm (see my upstream
23 > pie patches for arm). at least gcc-3.3.3-piepatches-8.7.5,
24 > gcc-3.4.0-piepatches-8.7.6.1 have to be used.
25 > check if the startfile/endfile sections mention pie.
26 >
27 > mips could be another problem, because it defaults already to PIC.
28 >
29 > could you run gcc -v and send the result for both cases?
30
31 - mips -
32
33 Reading specs from /usr/lib/gcc/mips-unknown-linux-gnu/3.4.0/specs
34 Configured with: /var/tmp/portage/gcc-3.4.0/work/gcc-3.4.0/configure
35 --prefix=/usr --bindir=/usr/mips-unknown-linux-gnu/gcc-bin/3.4
36 --includedir=/usr/lib/gcc/mips-unknown-linux-gnu/3.4.0/include
37 --datadir=/usr/share/gcc-data/mips-unknown-linux-gnu/3.4
38 --mandir=/usr/share/gcc-data/mips-unknown-linux-gnu/3.4/man
39 --infodir=/usr/share/gcc-data/mips-unknown-linux-gnu/3.4/info
40 --enable-shared --host=mips-unknown-linux-gnu
41 --target=mips-unknown-linux-gnu --with-system-zlib
42 --enable-languages=c,c++ --enable-threads=posix --enable-long-long
43 --disable-checking --enable-cstdio=stdio --enable-clocale=generic
44 --enable-__cxa_atexit --enable-version-specific-runtime-libs
45 --with-gxx-include-dir=/usr/lib/gcc/mips-unknown-linux-gnu/3.4.0/include/g++-v3 --with-local-prefix=/usr/local --disable-werror --enable-shared --enable-nls --without-included-gettext --disable-multilib
46 Thread model: posix
47 gcc version 3.4.0 (Gentoo Linux 3.4.0, pie-8.5.3)
48
49 I'll update it in the afternoon tmw (8-12 hrs from now) to current to
50 see where it stands.
51 [ebuild U ] sys-devel/gcc-3.4.0-r6 [3.4.0]
52
53
54 - arm -
55 Reading specs from /usr/lib/gcc-lib/armv4l-unknown-linux-gnu/3.3.3/specs
56 Configured with: /var/tmp/portage/gcc-3.3.3-r5/work/gcc-3.3.3/configure
57 --prefix=/usr --bindir=/usr/armv4l-unknown-linux-gnu/gcc-bin/3.3
58 --includedir=/usr/lib/gcc-lib/armv4l-unknown-linux-gnu/3.3.3/include
59 --datadir=/usr/share/gcc-data/armv4l-unknown-linux-gnu/3.3
60 --mandir=/usr/share/gcc-data/armv4l-unknown-linux-gnu/3.3/man
61 --infodir=/usr/share/gcc-data/armv4l-unknown-linux-gnu/3.3/info
62 --enable-shared --host=armv4l-unknown-linux-gnu
63 --target=armv4l-unknown-linux-gnu --with-system-zlib
64 --enable-languages=c,c++ --enable-threads=posix --enable-long-long
65 --disable-checking --disable-libunwind-exceptions --enable-cstdio=stdio
66 --enable-version-specific-runtime-libs
67 --with-gxx-include-dir=/usr/lib/gcc-lib/armv4l-unknown-linux-gnu/3.3.3/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext --disable-multilib --enable-__cxa_atexit --enable-clocale=generic
68 Thread model: posix
69 gcc version 3.3.3 20040412 (Gentoo Linux 3.3.3-r5, ssp-3.3-7,
70 pie-8.7.5.3)
71
72 [ebuild R ] sys-devel/gcc-3.3.3-r5 -X -bootstrap -build -debug
73 -debug -f77 -gcj -hardened -(java) -multilib -nls -objc -static -uclibc
74 23,201 kB
75
76
77 >
78 > Peter
79 --
80 Ned Ludd <solar@g.o>
81 Gentoo (hardened,security,infrastructure,embedded,toolchain) Developer

Attachments

File name MIME type
signature.asc application/pgp-signature