[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 16/27] compiler: Option to add PROVIDE_HIDDEN replacement for weak symbols



On 05/23/2018 12:54 PM, Thomas Garnier wrote:
> Provide an option to have a PROVIDE_HIDDEN (linker script) entry for
> each weak symbol. This option solve an error in x86_64 where the linker

                                solves

> optimizes pie generate code to be non-pie because --emit-relocs was used

                generated

> instead of -pie (to reduce dynamic relocations).
> 
> Signed-off-by: Thomas Garnier <thgarnie@xxxxxxxxxx>
> ---
>  init/Kconfig            |  7 +++++++
>  scripts/link-vmlinux.sh | 14 ++++++++++++++
>  2 files changed, 21 insertions(+)
> 
> diff --git a/init/Kconfig b/init/Kconfig
> index 0fc3a58d9f2f..2866cca86b4a 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -1954,6 +1954,13 @@ config ASN1
>         inform it as to what tags are to be expected in a stream and what
>         functions to call on what tags.
>  
> +config WEAK_PROVIDE_HIDDEN
> +     bool
> +     help
> +       Generate linker script PROVIDE_HIDDEN entries for all weak symbols. It
> +       allows to prevent non-pie code being replaced by the linker if the

                            non-PIE

> +       emit-relocs option is used instead of pie (useful for x86_64 pie).

                                                PIE                    PIE).

> +


-- 
~Randy

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.