This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: [patch ob] Disallow -pie and -static


>> Again, we could define what -static -pie means, but that definition
>> would include defining how the linker is supposed to handle the option
>> combination.
>
> i don't see why -pie should require PT_DYNAMIC or PT_INTERP. ?-static controls
> those aspects.
>
> with the compiler driver, -pie would be used to select the appropriate startup
> objects -- Scrt1.o/crt{begin,end}S.o/etc... vs crt1.o/crt{begin,end}.o/etc...

I'd have chimed in earlier, but have nothing to say that Ian hasn't
already said.

You can argue about what -static -pie should mean, but there's no
definition for it today, and no spec for the linker to follow.
Fundamentally, a PIE is going to need dynamic relocations, and there's
going to need to be some mechanism in the ABI that tells the linker
how to pass those to the runtime. Today, that mechanism involves
PT_DYNAMIC and the dynamic linker. Until that changes, -pie is
incompatible with -static.

-cary


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