Gentoo Archives: gentoo-musl

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-musl@l.g.o
Subject: Re: [gentoo-musl] What is crtbeginP.o ?
Date: Fri, 10 Jun 2016 11:09:58
Message-Id: e38e6c4b-8619-2d47-7178-9e1bd47c375c@gentoo.org
In Reply to: Re: [gentoo-musl] What is crtbeginP.o ? by Lei Zhang
1 On 6/10/16 6:00 AM, Lei Zhang wrote:
2
3 >
4 > First, thanks for your input :)
5 >
6 > I'm aware of crtbegin{S,T}.o, but it's the first time I see
7 > crtbeginP.o. Even more strangely, on my host:
8 > $ ls /usr/lib/gcc/x86_64-pc-linux-musl/4.9.3 | grep crtbegin
9 > crtbegin.o
10 > crtbeginS.o
11 > crtbeginT.o
12 >
13 > You can see crtbeginP.o is not used by the musl cross-compiler, but
14 > only on the musl based system.
15
16 As I suggested in my email, try using static and/or pie to see what they
17 are for. The collect2 line from `gcc -v --static -o test test.c` has
18 crtbeginP.o for our hardened compiler, but not vanilla. I was mistaken
19 in my earlier email when I said zorry and I chose T for the hardened
20 specific static crtbegin file. We chose P. If you need to understand
21 the internals, ask him.
22
23 --
24 Anthony G. Basile, Ph.D.
25 Gentoo Linux Developer [Hardened]
26 E-Mail : blueness@g.o
27 GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA
28 GnuPG ID : F52D4BBA