[PATCH] aarch64: Check PIC instead of SHARED in start.S
Szabolcs Nagy
szabolcs.nagy@arm.com
Fri Oct 6 11:01:00 GMT 2017
On 04/10/17 10:05, H.J. Lu wrote:
> On 10/3/17, Szabolcs Nagy <szabolcs.nagy@arm.com> wrote:
>>
>> it seems weak extern symbol is accessed via got and at
>> link time that is not relaxed to 0 with -static -pie
>> and the got entry is not initialized to 0 either.
>
> Please try the current hjl/pie/static branch. I added Pcrt1.o to
> to create static PIE. There is no weak extern symbol anymore.
> As long as there is no dynamic relocation before
> _dl_relocate_static_pie relocates static PIE, it should work.
>
i still get weak undefined symbols (pthread stuff when linking
without -lpthread)
how Pcrt1.o is supposed to work? it seems it is built the same
way as crt1.o? (i'd expect Pcrt1 to mean "static pie link with
pie libc.a", and crt1.o to mean "link executable that will be
relocated by a dynamic linker")
More information about the Libc-alpha
mailing list