[PATCH] D32399: [LLD] Order writable executable sections before writable ones
Mark Kettenis via llvm-commits
llvm-commits at lists.llvm.org
Mon May 1 16:07:57 PDT 2017
> From: =?UTF-8?Q?Rafael_Esp=C3=ADndola?= <rafael.espindola at gmail.com>
> Date: Thu, 27 Apr 2017 15:37:16 -0400
>
> What about the Config->SingleRoRx case? That is the bfd default on
> x86_64. Is that different on sparc?
I don't really know what the bfd default is. We've heavily modified
the ld.bfd linker scripts on OpenBSD for W^X and PIE.
My diff doesn't change the Config->SingleRoRx case. With my full
diff, if I pass -Wl,-no-rosegment I get a RWX .plt as a separate
segment in between .data and .bss. That's not quite right, but not
something that needs to be fixed immediately I'd say.
> Please update the comment to say why you want rxw sections before rw
> sections.
Will do that.
> I actually like the structure of the function. Writing it as a series of
>
> if (AFoo != BFoo)
> return Afoo;
>
> Gives a clear hierarchy and a place to put comments about why "Foo"
> should impact the order. After that return we have the post condition
> that all sections are Foo or !Foo.
>
> Cheers,
> Rafael
P.S. It seems mail replies don't make it back into Phabricator.
More information about the llvm-commits
mailing list