[CRIU] Fix pie.lds.S.in script to work with the gold linker

Ying Han yinghan at google.com
Mon Mar 10 11:28:49 PDT 2014


On Fri, Mar 7, 2014 at 3:32 PM, Saied Kazemi <saied at google.com> wrote:

> cat 0001-Fix-pie.lds.S.in-script-to-work-with-the-gold-linker.patch
> From e65747b94f52acdf422ae6f3f2c4d9d383665f2d Mon Sep 17 00:00:00 2001
> From: Saied Kazemi <saied at google.com>
> Date: Fri, 7 Mar 2014 14:49:00 -0800
> Subject: [PATCH] Fix pie.lds.S.in script to work with the gold linker
>
> The pie.lds.S.in needs two minor changes to work with the gold
> (/usr/bin/gold) linker.  These changes are compatible with /usr/bin/ld
> and make linker script more portable.
>
> The first change is adding a comma before /DISCARD/ so that the grammar
> won't be ambiguous.  Otherwise, gold treats it as a part of the assignment
> and would generate a syntax error about the "unexpected ':'".
>
> The second change is moving initialization of __export_parasite_args
> to inside the SECTIONS command because it references the dot symbol.
> Otherwise, gold would generate the error "invalid reference to dot symbol
> outside of SECTIONS clause."
>
> Signed-off-by: Saied Kazemi <saied at google.com>
> ---
>  pie/pie.lds.S.in | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/pie/pie.lds.S.in b/pie/pie.lds.S.in
> index cbdfaa9..97e6c41 100644
> --- a/pie/pie.lds.S.in
> +++ b/pie/pie.lds.S.in
> @@ -12,7 +12,7 @@ SECTIONS
>   . = ALIGN(32);
>   *(.got*)
>   . = ALIGN(32);
> - } =0x00000000
> + } =0x00000000,
>
>   /DISCARD/ : {
>   *(.debug*)
> @@ -22,6 +22,6 @@ SECTIONS
>   *(.eh_frame*)
>   *(*)
>   }
> -}
>
> -__export_parasite_args = .;
> + __export_parasite_args = .;
> +}
> --
> 1.9.0.279.gdc9e3eb
>
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20140310/096f09b1/attachment.html>


More information about the CRIU mailing list