Commit 8d8d6384 authored by Saied Kazemi's avatar Saied Kazemi Committed by Pavel Emelyanov

pie: 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. A 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: 's avatarSaied Kazemi <saied@google.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 21be9951
...@@ -12,7 +12,7 @@ SECTIONS ...@@ -12,7 +12,7 @@ SECTIONS
. = ALIGN(32); . = ALIGN(32);
*(.got*) *(.got*)
. = ALIGN(32); . = ALIGN(32);
} =0x00000000 } =0x00000000,
/DISCARD/ : { /DISCARD/ : {
*(.debug*) *(.debug*)
...@@ -22,6 +22,6 @@ SECTIONS ...@@ -22,6 +22,6 @@ SECTIONS
*(.eh_frame*) *(.eh_frame*)
*(*) *(*)
} }
}
__export_parasite_args = .; __export_parasite_args = .;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment