aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-arm.h
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2009-07-31 18:14:07 +0000
committerDaniel Jacobowitz <drow@false.org>2009-07-31 18:14:07 +0000
commitcd000bffb245795be23f4a024481dc192d30cae7 (patch)
tree5a44720c83799855bcb7c2945bf59c91bf87ac0a /gas/config/tc-arm.h
parent79d0a52d5db573cf4c24606f97008d8fd359a494 (diff)
downloadgdb-cd000bffb245795be23f4a024481dc192d30cae7.zip
gdb-cd000bffb245795be23f4a024481dc192d30cae7.tar.gz
gdb-cd000bffb245795be23f4a024481dc192d30cae7.tar.bz2
binutils/testsuite/
* binutils-all/arm/thumb2-cond.s: Use instructions instead of .short. gas/ * config/obj-elf.c (obj_elf_ident): Notify section change to the hook. * config/tc-arm.c (make_mapping_symbol): New function, from mapping_state. Save mapping symbols in the frag. (insert_data_mapping_symbol): New. (mapping_state): Use make_mapping_symbol, improve state transitions. (mapping_state_2): New. Provide dummy definition. (opcode_select): Do not call mapping_state. (s_bss): Call md_elf_section_change_hook instead of mapping_state. (output_inst): Update use of tc_frag_data. (new_automatic_it_block): Call mapping_state before emitting the IT instruction. (md_assemble): Move mapping_state to just before outputting the new instruction. (arm_handle_align): Update use of tc_frag_data. Call insert_data_mapping_symbol. (arm_init_frag): Update use of tc_frag_data. Call mapping_state_2. (arm_elf_change_section): Always update the mapping symbol FSM state. (check_mapping_symbols): New function. (arm_adjust_symtab): Use check_mapping_symbols. * config/tc-arm.h (struct arm_frag_type): New. (TC_FRAG_TYPE): Change to struct arm_frag_type. (TC_FRAG_INIT): Pass max_chars. (arm_init_frag): Update prototype. gas/testsuite/ * gas/arm/mapdir.d, gas/arm/mapdir.s: New files. * gas/arm/mapping.d: Adapted to new symbols generation. * gas/arm/mapping2.d: New test case. * gas/arm/mapping2.s: New file. * gas/arm/mapping3.d: New test case. * gas/arm/mapping3.s: New file. * gas/arm/mapping4.d: New test case. * gas/arm/mapping4.s: New file. * gas/arm/mapshort-eabi.d: Adapted to new symbols generation. * gas/elf/section2.e-armeabi: Adapted to new symbols generation.
Diffstat (limited to 'gas/config/tc-arm.h')
-rw-r--r--gas/config/tc-arm.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h
index 53ca895..d386770 100644
--- a/gas/config/tc-arm.h
+++ b/gas/config/tc-arm.h
@@ -199,8 +199,21 @@ void arm_copy_symbol_attributes (symbolS *, symbolS *);
/* For frags in code sections we need to record whether they contain
ARM code or THUMB code. This is that if they have to be aligned,
they can contain the correct type of no-op instruction. */
-#define TC_FRAG_TYPE int
-#define TC_FRAG_INIT(fragp) arm_init_frag (fragp)
+struct arm_frag_type
+{
+ int thumb_mode;
+#ifdef OBJ_ELF
+ /* If there is a mapping symbol at offset 0 in this frag,
+ it will be saved in FIRST_MAP. If there are any mapping
+ symbols in this frag, the last one will be saved in
+ LAST_MAP. */
+ symbolS *first_map, *last_map;
+#endif
+};
+
+#define TC_FRAG_TYPE struct arm_frag_type
+/* NOTE: max_chars is a local variable from frag_var / frag_variant. */
+#define TC_FRAG_INIT(fragp) arm_init_frag (fragp, max_chars)
#define HANDLE_ALIGN(fragp) arm_handle_align (fragp)
#define md_do_align(N, FILL, LEN, MAX, LABEL) \
@@ -307,7 +320,7 @@ extern char * arm_canonicalize_symbol_name (char *);
extern void arm_adjust_symtab (void);
extern void armelf_frob_symbol (symbolS *, int *);
extern void cons_fix_new_arm (fragS *, int, int, expressionS *);
-extern void arm_init_frag (struct frag *);
+extern void arm_init_frag (struct frag *, int);
extern void arm_handle_align (struct frag *);
extern bfd_boolean arm_fix_adjustable (struct fix *);
extern int arm_elf_section_type (const char *, size_t);