1 |
On Sat, 6 Jan 2007, Kevin F. Quinn wrote: |
2 |
|
3 |
[...] |
4 |
|
5 |
> The cases internal to gcc/glibc are exceptions, in that the archives are |
6 |
> used to build shared libraries (which use the lib*_nonshared.a archives |
7 |
> which should always be PIC anyway) and those executables - which if we |
8 |
|
9 |
lib*_nonshared.a does not have anything to do with this |
10 |
libc_nonshared.a is used, because: |
11 |
1. some objects have to go into each binary: |
12 |
- __libc_csu_init/fini |
13 |
- atexit |
14 |
2. because glibc changed the stat interface and to make updates possible |
15 |
they decided to put stat/fstat/lstat/fstatat/mknod/mknodat and their *64 |
16 |
counterparts into all binaries needing them |
17 |
3. __stack_chk_fail_local to get rid of jump relocation on x86[_64] at |
18 |
least (hardened/ssp) |
19 |
|
20 |
haven't checked why __warn_memset_zero_len was added |
21 |
|
22 |
for libpthread_nonshared.a, because: |
23 |
1. pthread_atfork has to go into each binary |
24 |
|
25 |
Note: for gcc libgcc.a is always -fPIC compiled (LIBGCC2_CFLAGS) |
26 |
|
27 |
Peter |
28 |
|
29 |
-- |
30 |
Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2 |
31 |
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2 |
32 |
|
33 |
-- |
34 |
gentoo-hardened@g.o mailing list |