1 |
On Thu, 2004-06-24 at 03:35, Alexander Gabert wrote: |
2 |
> Peter S. Mazinger wrote: |
3 |
> |
4 |
> > On 23 Jun 2004, Ned Ludd wrote: |
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 |
|
22 |
> > Is the used gcc surely patched for pie? |
23 |
|
24 |
|
25 |
[snip] |
26 |
|
27 |
|
28 |
> > |
29 |
> we already picked that out: |
30 |
> ld does not have a linker script for -pie on the affected arches: |
31 |
> the linker script normally contains a PROVIDE line for that. |
32 |
> simply copy the linker script for shared executables to the extension of |
33 |
> pie executables, this should be the "hack sluggish way" of doing things. |
34 |
|
35 |
I tested the command line you suggested with coping one script name to |
36 |
another but unfortunately that did not solve the problem on arm. |
37 |
|
38 |
> |
39 |
> |
40 |
> bye, |
41 |
> |
42 |
> Alex (sunburned and happy pappy) |
43 |
-- |
44 |
Ned Ludd <solar@g.o> |
45 |
Gentoo (hardened,security,infrastructure,embedded,toolchain) Developer |