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


> i'm not arguing that things will work today ... we all agree on that. ?my
> point was that the commit was light on details, and for pedants, not an
> entirely accurate error message.
>
> i don't think my implied question was answered: what was the reason for the
> internal error that gold was throwing ? ?it just didn't know what to do when
> give -pie -static ? ?or there was misbehavior with incoming objects that only
> occurred when using -pie -static ?

Gold was actually about to print an error message that -static was
used on a non-static link, and was trying to print the name of the
first dynamic object that caused the linker to believe it was not a
static link. There's an assert that there is at least one dynamic
object in that case, but the non-static link was caused by the use of
-pie, and there were no dynamic objects. The same thing would have
happened with -shared and -static, but that combination of options was
already excluded (in the same place where I added the exclusion of
-pie and -static). My patch was just to catch the conflict earlier
where it can be handled gracefully, rather than later, where it is
more awkward to handle.

-cary


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