aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-03-24 21:44:48 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2010-03-24 21:44:48 +0100
commit6d217c3249d527bb15f4e6153f39ce7e82b01778 (patch)
tree38ab18bcefc3a4d40156011bab09d1a86a4a0d59 /gcc/toplev.c
parent81ef7e2403b3d6025205e253c87fc3f50828b941 (diff)
downloadgcc-6d217c3249d527bb15f4e6153f39ce7e82b01778.zip
gcc-6d217c3249d527bb15f4e6153f39ce7e82b01778.tar.gz
gcc-6d217c3249d527bb15f4e6153f39ce7e82b01778.tar.bz2
re PR debug/43293 (Invalid unwind info for i?86 -fpic)
PR debug/43293 * target.h (struct gcc_target): Add code_end hook. * target-def.h (TARGET_ASM_CODE_END): Define to hook_void_void if not yet defined. (TARGET_ASM_OUT): Add TARGET_ASM_CODE_END. * toplev.c (compile_file): Call targetm.asm_out.code_end hook before unwind info/debug info output. * config/i386/winnt.c (i386_pe_file_end): Don't call ix86_file_end. * config/i386/linux.h (NEED_INDICATE_EXEC_STACK): Don't define. (TARGET_ASM_FILE_END): Define to file_end_indicate_exec_stack. * config/i386/linux64.h (NEED_INDICATE_EXEC_STACK): Don't define. (TARGET_ASM_FILE_END): Define to file_end_indicate_exec_stack. * config/i386/i386.c (ix86_file_end): Renamed to... (ix86_code_end): ... this. Make static. Don't call file_end_indicate_exec_stack. Emit unwind info using final_start_function/final_end_function. (darwin_x86_file_end): Remove. (TARGET_ASM_CODE_END): Define. * config/i386/i386.h (TARGET_ASM_FILE_END, NEED_INDICATE_EXEC_STACK): Don't define. * config/i386/darwin.h (darwin_x86_file_end): Remove prototype. (TARGET_ASM_FILE_END): Define to darwin_file_end. * config/i386/i386-protos.h (ix86_file_end): Remove prototype. * doc/tm.texi (TARGET_ASM_CODE_END): Document. From-SVN: r157707
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 385d5e1..fb3c4b2 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1084,6 +1084,10 @@ compile_file (void)
/* Write out any pending weak symbol declarations. */
weak_finish ();
+ /* This must be at the end before unwind and debug info.
+ Some target ports emit PIC setup thunks here. */
+ targetm.asm_out.code_end ();
+
/* Do dbx symbols. */
timevar_push (TV_SYMOUT);