This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why is _dl_relocate_static_pie linked into crt1.o?


On 07/05/2018 10:20 AM, Florian Weimer wrote:
> On 07/05/2018 04:12 PM, Andreas Schwab wrote:
>> On Jul 05 2018, Florian Weimer <fweimer@redhat.com> wrote:
>>
>>> Note that this is about the stub function in csu/,
>>
>> Isn't that built with stack projector automatically?  It certainly is
>> for me.
> 
> Not for me:
> 
> gcc static-reloc.c -c -std=gnu11 -fgnu89-inline  -O2 -Wall -Werror -Wp,-D_GLIBCXX_ASSERTIONS -Wundef -Wwrite-strings -fasynchronous-unwind-tables -fcf-protection -fmerge-all-constants -frounding-math -fstack-clash-protection -fstack-protector-strong -g -m64 -mtune=generic -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wstrict-prototypes -Wold-style-definition -fno-math-errno   -fpie -fno-stack-protector -DSTACK_PROTECTOR_LEVEL=0 -ftls-model=initial-exec […]
> 
> That's due to this in csu/Makefile:
> 
> CFLAGS-.o += $(no-stack-protector)
> CFLAGS-.op += $(no-stack-protector)
> CFLAGS-.os += $(no-stack-protector)

Can we fix this with a subsequent CFLAGS-static-reloc.o override?

I'm hesitant to make any major changes now that we are in slushy freeze
fro the release.

> The version in elf/ *is* compiled with stack protector, but that looks like a mistake to me.

Right, we would very likely crash calling the failure functions at
this early in the bootstrap.

-- 
Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]