From 6d217c3249d527bb15f4e6153f39ce7e82b01778 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 24 Mar 2010 21:44:48 +0100 Subject: 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 --- gcc/target-def.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc/target-def.h') diff --git a/gcc/target-def.h b/gcc/target-def.h index 0fe5d1339d4..a3c0b2c13a5 100644 --- a/gcc/target-def.h +++ b/gcc/target-def.h @@ -1,5 +1,5 @@ /* Default initializers for a generic GCC target. - Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it @@ -204,6 +204,10 @@ #define TARGET_ASM_FILE_END hook_void_void #endif +#ifndef TARGET_ASM_CODE_END +#define TARGET_ASM_CODE_END hook_void_void +#endif + #ifndef TARGET_EXTRA_LIVE_ON_ENTRY #define TARGET_EXTRA_LIVE_ON_ENTRY hook_void_bitmap #endif @@ -292,6 +296,7 @@ TARGET_ASM_CAN_OUTPUT_MI_THUNK, \ TARGET_ASM_FILE_START, \ TARGET_ASM_FILE_END, \ + TARGET_ASM_CODE_END, \ TARGET_ASM_EXTERNAL_LIBCALL, \ TARGET_ASM_MARK_DECL_PRESERVED, \ TARGET_ASM_RECORD_GCC_SWITCHES, \ -- cgit v1.2.1