From 696025802ec3273fde5cbf82c215a3d795435c1a Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Mon, 12 Jan 2015 15:24:20 +0100 Subject: gas: allow labeling of CFI instructions When runtime patching code (like e.g. done by the Linux kernel) there may be cases where the set of stack frame alterations differs between unpatched and patched code. Consequently the corresponding unwind data needs patching too. Locating the right places within an FDE, however, is rather cumbersome without a way to insert labels in the resulting section. Hence this patch introduces a new directive, .cfi_label. Note that with the way CFI data gets emitted currently (at the end of the assembly process) this can't support local FB- and dollar-labels. gas/ 2015-01-12 Jan Beulich * gas/dw2gencfi.c (cfi_add_label, dot_cfi_label): New. (cfi_pseudo_table): Add "cfi_label". (output_cfi_insn): Handle CFI_label. (select_cie_for_fde): Als terminate CIE when encountering CFI_label. * dw2gencfi.h (cfi_add_label): Declare. (struct cfi_insn_data): New member "sym_name". (CFI_label): New. * read.c (read_symbol_name): Drop "static". * read.h (read_symbol_name): Declare. gas/testsuite/ 2015-01-12 Jan Beulich gas/cfi/cfi-label.d, gas/cfi/cfi-label.s: New. gas/cfi/cfi.exp: Run new tests. --- gas/read.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gas/read.c') diff --git a/gas/read.c b/gas/read.c index 7dfc20a737..b2d50272d7 100644 --- a/gas/read.c +++ b/gas/read.c @@ -1600,7 +1600,7 @@ s_altmacro (int on) If a symbol name could not be read, the routine issues an error messages, skips to the end of the line and returns NULL. */ -static char * +char * read_symbol_name (void) { char * name; -- cgit v1.2.3