From 11cba4accf7f9a82fdb7902f0e36521038eda205 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 31 Aug 2012 02:52:14 +0000 Subject: Provide __executable_start for PIE ld/ PR ld/14525 * scripttempl/elf.sc: Also provide __executable_start for PIE. ld/testsuite/ PR ld/14525 * ld-elf/elf.exp: Run pr14525. * ld-elf/pr14525.c: New. * ld-elf/pr14525.out: Likewise. --- ld/scripttempl/elf.sc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ld/scripttempl') diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index 51a655e..72d2af7 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -335,7 +335,7 @@ SECTIONS /* Read-only sections, merged into text segment: */ ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}} ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR}${SIZEOF_HEADERS_CODE};}} - ${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR}${SIZEOF_HEADERS_CODE};}} + ${CREATE_PIE+${RELOCATING+PROVIDE (__executable_start = ${SHLIB_TEXT_START_ADDR}); . = ${SHLIB_TEXT_START_ADDR}${SIZEOF_HEADERS_CODE};}} EOF emit_early_ro() -- cgit v1.1