Commit Graph

11 Commits

Author SHA1 Message Date
Nick Clifton 3c6256d29e This patch adds a new pseudo-op - .seh_code - to structured exception handling
suite of ops.  It changes the current section back to the code section of the
current function.  This is helpful because the code section may not be .text.

	* config/obj-coff-seh.c (obj_coff_seh_code): New function -
	switches the current segment back to the code segment recorded
	when seh_proc was last invoked.
	* config/obj-coff-seh.h (SEH_CMDS): Add seh_code.
2014-03-25 16:50:10 +00:00
Alan Modra 4b95cf5c0c Update copyright years 2014-03-05 22:16:15 +10:30
Kai Tietz bea2c1d72c ChangeLog gas
2010-09-15  Kai Tietz  <kai.tietz@onevision.com>

	* config/obj-coff-seh.c (seh_validate_seg): New funtion.
	(obj_coff_seh_endproc): Add check for segment.
	(obj_coff_seh_endprologue): Likewise.
	(obj_coff_seh_pushreg): Likewise.
	(obj_coff_seh_pushframe): Likewise.
	(obj_coff_seh_save): Likewise.
	(obj_coff_seh_setframe): Likewise.

ChangeLog gas/testsuite

2010-09-15  Kai Tietz  <kai.tietz@onevision.com>

	* gas/pe/pe.exp: Add new test.
	* gas/pe/seh-x64-err-1.l: New.
	* gas/pe/seh-x64-err-1.s: New.
2010-09-15 19:48:52 +00:00
Kai Tietz 2d7f492901 ChangeLog gas
2010-09-15  Kai Tietz  <kai.tietz@onevision.com>

       * config/obj-coff-seh.h (seh_context): New member code_seg.
       * config/obj-coff-seh.c: Implementing xdata/pdata section cloning
       for link-once code-segment.

ChangeLog ld

2010-09-15  Kai Tietz  <kai.tietz@onevision.com>

       * scripttempl/pep.sc: Add .xdata segment and
       put into .pdata all segments beginning with .pdata.

ChangeLog gas/testsuite
2010-09-15  Kai Tietz  <kai.tietz@onevision.com>

       * gas/pe/pe.exp: Add peseh-x64-4,5,6 tests.
       * gas/pe/peseh-x64-4.s: New.
       * gas/pe/peseh-x64-4.d: New.
       * gas/pe/peseh-x64-5.d: New.
       * gas/pe/peseh-x64-6.d: New.
2010-09-15 19:43:56 +00:00
Kai Tietz 6e0973c0aa 2010-08-31 Kai Tietz <kai.tietz@onevision.com>
* config/obj-coff-seh.c (obj_coff_seh_save): Correct comparison.
        (obj_coff_seh_stackalloc): Likewise.
2010-08-31 14:45:35 +00:00
Richard Henderson 681418c21c * config/obj-coff-seh.c: Rewrite the entire file.
(symtab, symptr, reltab, relcount, relsize): Remove.
	(seh_ctx_root, seh_ctx): Remove.
	(xdata_seg, xdata_subseg, pdata_seg): New.
	(switch_xdata, switch_pdata): New.
	(verify_context, verify_context_and_target, skip_whitespace_and_comma):
	New parsing functions.  Rewrite all parsing functions to use them.
	(obj_coff_seh_32): Fix != arm thinko.
	(obj_coff_seh_handler): For x64, don't accept handler pointer here,
	only flags.
	(obj_coff_seh_handlerdata): New.
	(do_seh_endproc): Split out of ...
	(obj_coff_seh_endproc): ... here.
	(obj_coff_seh_proc): Use it, if needed.
	(seh_x64_make_prologue_element): Use XRESIZEVEC, symbol_temp_new_now.
	(seh_x64_read_reg): Remove mm_regs alternative.  Tidy integer reg
	alternatives.  Don't slurp commas.
	(seh_read_offset): Remove.
	(obj_coff_seh_pushframe): Split out from obj_coff_seh_push.
	(obj_coff_seh_scope): Remove.
	(obj_coff_seh_save): Decide UWOP_SAVE_* vs _FAR immediately.
	(obj_coff_seh_stackalloc): Decide _SMALL vs _LARGE immediately.
	(out_one, out_two, out_four): New.
	(seh_x64_write_prologue_data, seh_x64_size_prologue_data,
	seh_x64_write_function_xdata, write_function_xdata): Rewrite
	from seh_x64_write_xdata, seh_needed_unwind_info, seh_store_elm_data,
	seh_getelm_data_size, seh_getsize_of_unwind_entry,
	seh_make_unwind_entry, seh_getsize_unwind_data, and
	seh_create_unwind_data.
	(seh_arm_write_function_pdata): Rewrite from seh_arm_create_pdata.
	(write_function_pdata): Rewrite from make_function_entry_pdata.
	(seh_write_text_eh_data, make_function_entry_pdata,
	seh_arm_create_pdata, seh_arm_write_pdata, seh_reloc, save_relocs,
	seh_symbol_init, seh_symbol, quick_section, seh_emit_rva,
	seh_emit_long, seh_make_globl, seh_make_section2, seh_make_section,
	seh_make_xlbl_name, make_seh_text_label, seh_fill_pcsyms,
	seh_needed_unwind_info, seh_store_elm_data, seh_getelm_data_size,
	seh_getsize_of_unwind_entry, seh_make_unwind_entry,
	seh_getsize_unwind_data, seh_create_unwind_data,
	seh_make_function_entry_xdata, seh_x64_makescope_elem): Remove.
	* config/obj-coff-seh.h (SEH_CMDS): Remove seh_savemm, seh_scope.
	Add seh_handlerdata.  Adjust function/what arguments for
	seh_savereg, seh_pushframe, seh_stackalloc.
	(struct seh_prologue_element): Adjust members to closer match
	the elements of the UNWIND_CODE structure.
	(struct seh_scope_elem): Remove.
	(struct seh_context): Replace char* members with symbolS or
	expressionS as appropriate.  Sort members by ARM/x64 applicability.
	Remove obsolete stuff wrt direct symbol and reloc manipulation.
2010-08-30 21:51:28 +00:00
Kai Tietz 1e17085dea 2010-07-15 Kai Tietz <kai.tietz@onevision.com>
* config/obj-coff-seh.c
	(seh_getelm_data_size): New.
	(seh_read_offset): Handle negative values.
	(obj_coff_seh_push): Handle offset for save-register store.
	(obj_coff_seh_setframe): Add unwind-information for frame.
	(seh_store_elm_data): New.
	(seh_getelm_data_size): Return additionally unaligned element count.
	(seh_make_unwind_entry): Correct tweak about element count.
2010-07-15 13:42:20 +00:00
Nick Clifton 604ab327fd * config/obj-coff-seh.c (seh_arm_write_pdata): Test for
seh_ctx_root being NULL.
2009-08-26 08:26:53 +00:00
Kai Tietz 688805f3b8 Fix obvious fix.
CVS: ----------------------------------------------------------------------
2009-08-18 17:50:12 +00:00
Kai Tietz 284e05313f 2009-08-18 Kai Tietz <kai.tietz@onevision.com>
* config/obj-coff-seh.c: Add copyright notice.
        * config/obj-coff-seh.h: Add copyright notice.
        Add x64 specific macros from coff/pe.h header.
2009-08-18 16:44:35 +00:00
Kai Tietz 987499b242 Add missed files. 2009-08-17 11:46:29 +00:00